Skip to content

Commit

Permalink
Fix update tag script to checkout to the target branch
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Nov 3, 2023
1 parent f6739de commit 9da6692
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ jobs:

- name: Commit & push
run: |
echo "Tag name from github.ref_name: ${{ github.event.release.target_commitish }}"
./scripts/commit-code.sh ${{ github.event.release.target_commitish }}
- name: Update tag
run: |
echo "Tag name from github.ref_name: ${{ github.event.release.tag_name }}"
./scripts/update-tag.sh ${{ github.event.release.tag_name }}
./scripts/update-tag.sh ${{ github.event.release.tag_name }} ${{ github.event.release.target_commitish }}
- name: Release
run: make releaseCocoaPods
3 changes: 2 additions & 1 deletion scripts/update-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ set -euo pipefail

CURRENT_TAG="$1"
TEMP_TAG="${CURRENT_TAG}-temp"
GITHUB_BRANCH="${2}"

echo "Going to push the tag changes."
git config --global user.name 'PostHog Github Bot'
git config --global user.email '[email protected]'
git fetch
git checkout ${CURRENT_TAG}
git checkout ${GITHUB_BRANCH}
# Create a new temporary tag after pushing the changes from the previous tag (bump version)
git tag -a ${TEMP_TAG} -m "${TEMP_TAG}"
# Remove the current tag
Expand Down

0 comments on commit 9da6692

Please sign in to comment.