name: Tag all repos on: release: types: [published] # Manual trigger from the UI workflow_dispatch: jobs: bump-casks: runs-on: macos-latest steps: - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' uses: actions/checkout@v3 if: ${{ contains(github.event.release.tag_name, 'nightly') }} 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' 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 run: | TAG_NAME=$(node -p 'require("./package.json").version') 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