fix: update release workflow to use latest tag

This commit is contained in:
Prad Nukala
2024-10-01 16:41:26 -04:00
parent e8218d77a4
commit 45602058f6
5 changed files with 22 additions and 73 deletions
+1
View File
@@ -36,3 +36,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_PERSONAL_AUTH_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
+19 -3
View File
@@ -19,21 +19,37 @@ jobs:
with:
go-version: "1.22"
check-latest: true
- name: Run tests
run: make test
check-protos:
name: "Check Protobuf Breaking Changes"
runs-on: ubuntu-latest
continue-on-error: true
outputs:
has_breaking_changes: ${{ steps.check_breaking.outputs.has_breaking_changes }}
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
- id: check_breaking
uses: bufbuild/buf-breaking-action@v1
with:
against: "https://github.com/onsonr/sonr.git#branch=master"
- name: Set output
run: echo "has_breaking_changes=${{ steps.check_breaking.outcome == 'failure' }}" >> $GITHUB_OUTPUT
bump-version:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
needs: [run-tests, check-protos]
runs-on: ubuntu-latest
name: "Bump Version"
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
increment: ${{ needs.check-protos.outputs.has_breaking_changes == 'true' && 'MINOR' || 'PATCH' }}