-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add goreleaser to attach binary packages to releases
- Loading branch information
Showing
5 changed files
with
49 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
name: Go | ||
name: Go - Release Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
|
||
concurrency: | ||
# Cancels pending runs when a PR gets updated. | ||
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
@@ -40,11 +55,31 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
go-version: 1.20.7 | ||
|
||
- name: Run golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.53.3 | ||
skip-pkg-cache: true | ||
skip-build-cache: true | ||
args: --timeout=10m | ||
|
||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- name: Setup Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.20.7 | ||
- name: Execute GoReleaser | ||
uses: goreleaser/[email protected] | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters