Skip to content

Commit

Permalink
[ci] Fix release automation: use default GITHUB_HEAD_REF environment …
Browse files Browse the repository at this point in the history
…variable, custom GITHUB_REF was shadowed by the default GITHUB_REF with other contents
  • Loading branch information
tatiana-yan committed Jun 7, 2024
1 parent 9179403 commit 60c1e2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/create_new_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
fetch-depth: 0
- name: Create release
run: |
VERSION=$(echo "${GITHUB_REF}" | sed -E "s/^release[\/-]//")
gh release create $VERSION --notes "Bump to $VERSION" --title "Release-$VERSION" --target "${GITHUB_REF}"
VERSION=$(echo "${GITHUB_HEAD_REF}" | sed -E "s/^release[\/-]//")
gh release create $VERSION --notes "Bump to $VERSION" --title "Release-$VERSION" --target "${GITHUB_HEAD_REF}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: ${{github.head_ref}}
3 changes: 1 addition & 2 deletions .github/workflows/merge_release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ jobs:
--url https://circleci.com/api/v2/project/github/mapbox/mapbox-common-ios/pipeline \
--header 'Circle-Token: ${CIRCLECI_TOKEN}' \
--header 'content-type: application/json' \
--data '{"branch":"${GITHUB_REF}"}'
--data '{"branch":"${GITHUB_HEAD_REF}"}'
done
env:
GITHUB_REF: ${{ github.head_ref }}
CIRCLECI_TOKEN: ${{ secrets.CCI_TOKEN }}

0 comments on commit 60c1e2e

Please sign in to comment.