From 8899872bc51820a319d6875c64be42799344b4ad Mon Sep 17 00:00:00 2001 From: Vijay A Date: Fri, 1 Jul 2022 09:05:07 +0530 Subject: Trying to check if tagging of submodule works [skip ci] --- .github/workflows/tag-repos.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to '.github/workflows/tag-repos.yml') diff --git a/.github/workflows/tag-repos.yml b/.github/workflows/tag-repos.yml index a8459c1e6..794b031bc 100644 --- a/.github/workflows/tag-repos.yml +++ b/.github/workflows/tag-repos.yml @@ -7,29 +7,39 @@ on: workflow_dispatch: jobs: - bump-casks: + tag-repos: runs-on: macos-latest steps: - - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' + - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'release' uses: actions/checkout@v3 - if: ${{ contains(github.event.release.tag_name, 'nightly') }} + if: ${{ contains(github.event.release.tag_name, 'nightly') || (github.event_name == 'workflow_dispatch') }} with: ref: nightly submodules: recursive fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging - - name: Checkout code along with submodules for the 'release' branch if the trigger event is 'scheduled' + - name: Checkout code along with submodules for the 'release' branch if the trigger event is 'release' uses: actions/checkout@v3 if: ${{ !contains(github.event.release.tag_name, 'nightly') }} with: ref: release submodules: recursive fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging - - name: Tag the branch + - name: Extract Git tag name from the currently checked out branch (not from the branch where this run was kicked off) run: | TAG_NAME=$(node -p 'require("./package.json").version') + echo "TAG_NAME=v$TAG_NAME" >> $GITHUB_ENV + shell: bash + - name: Tag the main repo + run: | git tag -f $TAG_NAME git push origin --tags --no-verify - # Also tag the submodule so as to help identify which changes went into which nightly release - # TODO: Not working due to cross-repo access issues by the github-action bot - # git -C recipes tag -f $TAG_NAME - # git -C recipes push origin --tags --no-verify + shell: bash + # Also tag the submodule so as to help identify which changes went into which release + # TODO: Not working due to cross-repo access issues by the github-action bot + # - name: Tag the submodule + # env: + # GH_TOKEN: ${{ secrets.FERDIUM_RECIPES_PUBLISH_TOKEN }} + # run: | + # git -C recipes tag -f $TAG_NAME + # git -C recipes push origin --tags --no-verify + # shell: bash -- cgit v1.2.3-54-g00ecf