Skip to content

Commit

Permalink
fix release drafting (#144)
Browse files Browse the repository at this point in the history
Signed-off-by: HaniAlshikh <[email protected]>

Signed-off-by: HaniAlshikh <[email protected]>
  • Loading branch information
HaniAlshikh authored Jan 10, 2023
1 parent be4f5fe commit 22d8192
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
1 change: 0 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ archives:
darwin: osx
windows: win
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"

checksum:
name_template: "checksums.txt"
snapshot:
Expand Down

0 comments on commit 22d8192

Please sign in to comment.