Skip to content

Commit

Permalink
fix: release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
VassilisPallas committed Oct 23, 2023
1 parent 9925b6f commit 880ef0e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 38 deletions.
30 changes: 9 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,31 @@ name: Build

on:
push:
branches: [ "main", "develop" ]
branches: [ "main" ]
pull_request:
branches: [ "main", "develop" ]
branches: [ "main", "release" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
- uses: actions/checkout@v3

-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

-
name: Build
- name: Build
run: make build

-
name: Format
- name: Format
run: make format

-
name: Vet
- name: Vet
run: make vet

-
name: Linter
- name: Linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
skip-pkg-cache: true

-
name: Test
- name: Test
run: make test
15 changes: 4 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,14 @@ jobs:
runs-on: ubuntu-latest
steps:

-
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0

-
run: git fetch --force --tags

-
uses: actions/setup-go@v4
- run: git fetch --force --tags
- uses: actions/setup-go@v4
with:
go-version: '1.21'

-
uses: goreleaser/goreleaser-action@v5
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
Expand Down
9 changes: 3 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
builds:
-
ldflags:
- ldflags:
- -s -w -X "main.version={{.Env.RELEASE_VERSION}}"
main: cmd/gvs/main.go
binary: gvs
Expand Down Expand Up @@ -28,8 +27,7 @@ changelog:
- '^docs:'
- '^test:'
archives:
-
name_template: '{{ .ProjectName }}_{{.Env.RELEASE_VERSION}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
- name_template: '{{ .ProjectName }}_{{.Env.RELEASE_VERSION}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: darwin
linux: linux
Expand All @@ -39,8 +37,7 @@ archives:
# - goos: windows
# format: zip
brews:
-
name: gvs
- name: gvs
alternative_names:
- gvs@{{ .Version }}
- gvs@{{ .Major }}
Expand Down

0 comments on commit 880ef0e

Please sign in to comment.