Skip to content

Commit

Permalink
Remove creation of redundant tag from 'create release' workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgeary committed Aug 16, 2024
1 parent c14e49c commit 0b9bad6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,14 @@ jobs:
commit_user_name: ${{ github.actor }}
commit_user_email: ${{ github.actor }}@users.noreply.github.com

- name: Update git tag on latest commit
- name: Remove original git tag
# The deletes the original prefixed tag on the remote (origin) repo but
# obviously doesn't remove it from any local repos that created/pulled
# the tag beforehand. That shouldn't be an issue though, as we're only
# tidying it up because it's redundant.
run: |
git tag -d ${{ steps.get-tag.outputs.tag }}
git push origin :refs/tags/${{ steps.get-tag.outputs.tag }}
git tag v${{ steps.get-version.outputs.version }}
git push origin --tags
- name: Create draft Github pre-release for ${{ steps.get-version.outputs.version }} (${{ env.IS_PRERELEASE }})
if: env.IS_PRERELEASE == 'true'
Expand Down
4 changes: 2 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ In creating the release, the "build#" prefix will be removed from the tag and th
version number. The workflow will update the `version` properties in the repo's _package.json_ files
for both the top-level project and the library, and then these updated files will be committed back
to the repo. Because the original 'build#' tag is no longer on the commit that represents the
release, that tag will be deleted and a new tag matching the version number added to the new commit
to correctly identify it as the source of the release.
release, that tag will be deleted (the new release will automatically create a tag matching the
version number on the new commit to correctly identify it as the source of the release).

> This does mean that the release author (and anyone pulling the `main` branch after the build tag
has been added but before the release has been created) will end up with a redundant tag in their
Expand Down

0 comments on commit 0b9bad6

Please sign in to comment.