Skip to content

Commit

Permalink
fix: update release to set major/minor release tags
Browse files Browse the repository at this point in the history
  • Loading branch information
bensandee committed Mar 26, 2024
1 parent 5acace0 commit 23ba7e1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Tag published version
run: |
git tag -a latest -f -m "Published version latest" ${GITHUB_SHA}
git push origin latest
- name: Install exiftool
run: sudo apt-get install -y exiftool

Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.GH_RELEASE_TOKEN }}

- uses: actions/checkout@v4
- name: tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git remote add gh-token "https://${{ secrets.GH_RELEASE_TOKEN }}@github.com/${{ github.repository }}.git"
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

0 comments on commit 23ba7e1

Please sign in to comment.