-
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.
- Loading branch information
1 parent
e2c8820
commit 9e1754f
Showing
3 changed files
with
41 additions
and
49 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,23 +1,45 @@ | ||
name: 'Deploy to master' | ||
name: GO | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
# Defining jobs | ||
jobs: | ||
# Lint job for Go code | ||
lint: | ||
name: Lint Go Code | ||
build: | ||
strategy: | ||
matrix: | ||
go-version: [1.23.0] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Build | ||
run: go build | ||
- name: Run Tests | ||
run: go test | ||
|
||
goreleaser: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 # Checks out the code | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.23' # Sets up Go 1.23 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
go-version: 1.23.0 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
version: v1.42.0 # Uses golangci-lint version 1.42.0 | ||
version: v1.9.2 | ||
args: release --rm-dist | ||
env: | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
CGO_ENABLED: 0 |
This file was deleted.
Oops, something went wrong.
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