-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: eternal-flame-AD <[email protected]>
- Loading branch information
1 parent
091c687
commit 5d14e4b
Showing
3 changed files
with
68 additions
and
21 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Go Check | ||
on: [push, pull_request] | ||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: [1.20.x, 1.21.x, 1.22.x] | ||
steps: | ||
- name: Setup Go environment | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
stable: true | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get dependencies | ||
run: go get -v -t -d ./... | ||
|
||
- name: Test | ||
run: go test ./... |
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,45 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Go Check"] | ||
types: | ||
- completed | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release: | ||
|
||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Go environment | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22.x | ||
stable: true | ||
|
||
- name: Get dependencies | ||
run: go get -v -t -d ./... | ||
|
||
- name: Build | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: | | ||
TAG=$(git describe --tags --abbrev=0) | ||
GIT_TAG=$TAG make clean build | ||
- name: Create release | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
files: build/* | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true | ||
name: Release ${{ github.ref }} |
This file was deleted.
Oops, something went wrong.