From 22d81926fedf051dc591fd13f4cc567479690652 Mon Sep 17 00:00:00 2001 From: Hani Alshikh Date: Tue, 10 Jan 2023 14:54:37 +0100 Subject: [PATCH] fix release drafting (#144) Signed-off-by: HaniAlshikh Signed-off-by: HaniAlshikh --- .github/release-drafter.yml | 5 +++-- .github/workflows/release.yaml | 23 ++++++++++++++++------- .goreleaser.yaml | 1 - 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a037653..6cd7889 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,5 +1,5 @@ -name-template: 'v$RESOLVED_VERSION' -tag-template: 'v$RESOLVED_VERSION' +name-template: '$RESOLVED_VERSION' +tag-template: '$RESOLVED_VERSION' categories: - title: 'Features' labels: @@ -18,6 +18,7 @@ categories: - 'chore' change-template: '- $TITLE @$AUTHOR (#$NUMBER)' change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. +version-template: "v$MAJOR.$MINOR.$PATCH" version-resolver: major: labels: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dfd0242..22f84a1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,21 +16,30 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 with: fetch-depth: 0 - run: git fetch --force --tags - - uses: actions/setup-go@v3 + - name: Setup Go + uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} cache: true - # More assembly might be required: Docker logins, GPG, etc. It all depends - # on your needs. - - uses: goreleaser/goreleaser-action@v3 + - name: set VERSION + run: echo "VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV + - name: Publish draft + uses: release-drafter/release-drafter@v5 + with: + version: ${{ env.VERSION }} + publish: true + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Release + uses: goreleaser/goreleaser-action@v3 with: - # either 'goreleaser' (default) or 'goreleaser-pro': distribution: goreleaser version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GORELEASER_REPO_WRITE }} + GITHUB_TOKEN: ${{ secrets.GORELEASER_REPO_WRITE }} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ef844d2..6b18047 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -23,7 +23,6 @@ archives: darwin: osx windows: win name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}" - checksum: name_template: "checksums.txt" snapshot: