-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: split development and release build github workflows
- Loading branch information
Showing
4 changed files
with
49 additions
and
5 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,15 @@ | ||
name: Go | ||
name: Go - Development Build | ||
|
||
on: [push] | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
# Cancels pending runs when a PR gets updated. | ||
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
|
@@ -40,7 +49,6 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
go-version: 1.20.7 | ||
|
||
- name: Run golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
|
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Go - Release Build | ||
|
||
on: | ||
push: | ||
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 | ||
|
||
jobs: | ||
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