Skip to content

Commit

Permalink
fix(goreleaser): changelog generation on stable releases (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsozolins authored Sep 20, 2023
1 parent 43ac8a8 commit 4f6a04a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get previous stable release tag
id: previous-stable-release-tag
if: (!contains(github.ref, 'pre'))
run: |
git fetch --tags
previous_stable_tag=$(git tag | sort -V | grep -v "pre" | tail -2 | head -1)
echo "GORELEASER_PREVIOUS_TAG=$previous_stable_tag" >> $GITHUB_OUTPUT
- name: Run GoReleaser for stable release
uses: goreleaser/goreleaser-action@v4
if: (!contains(github.ref, 'pre'))
Expand All @@ -58,6 +66,8 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
GORELEASER_PREVIOUS_TAG: ${{ steps.previous-stable-release-tag.outputs.GORELEASER_PREVIOUS_TAG }}

- name: Run GoReleaser for pre-release
uses: goreleaser/goreleaser-action@v4
Expand Down

0 comments on commit 4f6a04a

Please sign in to comment.