Skip to content

Commit

Permalink
Add releases with goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
dnnrly committed Mar 29, 2022
1 parent 00e4510 commit 2763eab
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
with:
go-version: '1.17'
- name: Install dependencies
run: make test-deps
run: make deps
- name: Unit test
run: make test
- name: Linting
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,29 @@ jobs:
steps:
- uses: actions/checkout@master
- uses: actions/setup-go@v1
env:
GO111MODULE: on
with:
go-version: '1.17'
- run: make test-deps test
- run: make deps test
release:
name: Release
runs-on: ubuntu-latest
needs: [ validate ]
steps:
- name: Check out code
uses: actions/checkout@master
- name: Perform release
run: make release
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: on
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ clean-deps:
./tmp:
mkdir -p ./tmp

.PHONY: test-deps
test-deps: ./bin/tparse ./bin/golangci-lint
.PHONY: deps
deps: ./bin/tparse ./bin/golangci-lint
go get -v ./...
go mod tidy

Expand Down

0 comments on commit 2763eab

Please sign in to comment.