Skip to content

Commit

Permalink
Fix go releaser (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahlunar committed Aug 16, 2024
1 parent fd8f174 commit dcb52e5
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: GoReleaser Check

on:
push:
branches:
- "master"
pull_request:

jobs:
goreleaser-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.0
- name: Run GoReleaser Check
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: check
11 changes: 2 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.0
- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
go-version: 1.23.0
- name: Docker Login
uses: docker/login-action@v3
with:
Expand All @@ -37,6 +30,6 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 3 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
version: 2

builds:
- binary: artifact
Expand Down Expand Up @@ -62,11 +61,11 @@ checksum:
name_template: '{{ .ProjectName }}-checksums.txt'

snapshot:
name_template: "git-{{.Commit}}"
version_template: "git-{{.Commit}}"

release:
name_template: "v{{.Version}}"
prerelease: auto

changelog:
skip: true
disable: true

0 comments on commit dcb52e5

Please sign in to comment.