chore(deps): update dependency goreleaser/goreleaser to v2.5.0 (#379) #1292
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
name: CI | |
env: | |
PACKAGES: openvpn crossbuild-essential-arm64 libssl-dev:arm64 | |
# renovate: github=golangci/golangci-lint | |
GO_LINT_CI_VERSION: v1.62.2 | |
# renovate: github=goreleaser/goreleaser | |
GORELEASER_VERSION: v2.5.0 | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build & Test | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version-file: 'go.mod' | |
- run: go mod tidy -diff | |
- run: go build | |
- run: go test ./... -timeout 20s -race -covermode=atomic -coverprofile=coverage.out -coverpkg=./... | |
- run: go test ./... -timeout 20s -bench . -benchmem -count 3 | |
- name: Write gpg sign key | |
if: env.GPG_KEY != null | |
run: echo "$GPG_KEY" > "$GPG_KEY_PATH" | |
env: | |
GPG_KEY_PATH: "${{ secrets.GPG_KEY_PATH }}" | |
GPG_KEY: ${{ secrets.GPG_KEY }} | |
- name: go build (with goreleaser) | |
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0 | |
with: | |
version: ${{ env.GORELEASER_VERSION }} | |
args: release --snapshot | |
env: | |
GITHUB_TOKEN: "" | |
GPG_KEY_PATH: "" | |
- uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
with: | |
name: dists | |
path: dist/ | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version-file: 'go.mod' | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 | |
with: | |
version: ${{ env.GO_LINT_CI_VERSION }} | |
publish: | |
name: Publish package | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- build | |
- lint | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | |
with: | |
go-version-file: 'go.mod' | |
- name: Write gpg sign key | |
run: echo "$GPG_KEY" > "$GPG_KEY_PATH" | |
env: | |
GPG_KEY_PATH: "${{ secrets.GPG_KEY_PATH }}" | |
GPG_KEY: ${{ secrets.GPG_KEY }} | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0 | |
with: | |
version: ${{ env.GORELEASER_VERSION }} | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GORELEASER_CURRENT_TAG: ${{ github.ref_name }} | |
NFPM_OPENVPN-AUTH-OAUTH2_PASSPHRASE: ${{ secrets.NFPM_PASSPHRASE }} | |
GPG_KEY_PATH: ${{ secrets.GPG_KEY_PATH }} |