From 82283f7c5446200dca979a9063bb7dd8b69525e0 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Mon, 24 Apr 2023 12:10:36 -0700 Subject: [PATCH] ci: additional CI fixes --- .github/workflows/release.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 24a4935..ca1cc64 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,19 +5,22 @@ on: branches: [ main ] +permissions: + contents: read + packages: write + + env: GITHUB_TOKEN: ${{ github.token }} SVU_VERSION: 1.10.2 -permissions: - contents: write - jobs: tag: runs-on: ubuntu-latest outputs: VERSION: ${{ steps.tag.outputs.VERSION }} + PREV_VERSION: ${{ steps.tag.outputs.PREV_VERSION }} steps: - uses: actions/checkout@v3 @@ -38,16 +41,22 @@ jobs: - id: tag run: | echo "VERSION=$(svu next --tag-mode all-branches)" >> $GITHUB_OUTPUT + echo "PREV_VERSION=$(svu current --tag-mode all-branches)" >> $GITHUB_OUTPUT git tag "$(svu next --tag-mode all-branches)" git push --tags goreleaser: needs: [tag] runs-on: ubuntu-latest + env: + GORELEASER_CURRENT_TAG: ${{ needs.tag.outputs.VERSION }} + GORELEASER_PREVIOUS_TAG: ${{ needs.tag.outputs.PREV_VERSION }} + steps: - uses: actions/checkout@v3 with: fetch-depth: 0 + - run: git fetch --force --tags - uses: actions/setup-go@v4 with: @@ -56,6 +65,7 @@ jobs: with: distribution: goreleaser args: release --clean + version: latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}