diff options
Diffstat (limited to '.github/workflows/tag-repos.yml')
-rw-r--r-- | .github/workflows/tag-repos.yml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/.github/workflows/tag-repos.yml b/.github/workflows/tag-repos.yml new file mode 100644 index 000000000..a8459c1e6 --- /dev/null +++ b/.github/workflows/tag-repos.yml | |||
@@ -0,0 +1,35 @@ | |||
1 | name: Tag all repos | ||
2 | |||
3 | on: | ||
4 | release: | ||
5 | types: [published] | ||
6 | # Manual trigger from the UI | ||
7 | workflow_dispatch: | ||
8 | |||
9 | jobs: | ||
10 | bump-casks: | ||
11 | runs-on: macos-latest | ||
12 | steps: | ||
13 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' | ||
14 | uses: actions/checkout@v3 | ||
15 | if: ${{ contains(github.event.release.tag_name, 'nightly') }} | ||
16 | with: | ||
17 | ref: nightly | ||
18 | submodules: recursive | ||
19 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging | ||
20 | - name: Checkout code along with submodules for the 'release' branch if the trigger event is 'scheduled' | ||
21 | uses: actions/checkout@v3 | ||
22 | if: ${{ !contains(github.event.release.tag_name, 'nightly') }} | ||
23 | with: | ||
24 | ref: release | ||
25 | submodules: recursive | ||
26 | fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging | ||
27 | - name: Tag the branch | ||
28 | run: | | ||
29 | TAG_NAME=$(node -p 'require("./package.json").version') | ||
30 | git tag -f $TAG_NAME | ||
31 | git push origin --tags --no-verify | ||
32 | # Also tag the submodule so as to help identify which changes went into which nightly release | ||
33 | # TODO: Not working due to cross-repo access issues by the github-action bot | ||
34 | # git -C recipes tag -f $TAG_NAME | ||
35 | # git -C recipes push origin --tags --no-verify | ||