ci(deps): upgrade all dependencies (#121) #200
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: build | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # [email protected] | |
- name: Setup Go | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # [email protected] | |
with: | |
go-version-file: go.mod | |
cache: true | |
- name: Build | |
run: make build | |
- name: Test | |
run: make test | |
- name: Coverage | |
uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # [email protected] | |
with: | |
files: coverage.out | |
token: ${{ secrets.CODECOV_TOKEN }} | |
lint: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: read | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # [email protected] | |
- name: Setup Go | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # [email protected] | |
with: | |
go-version-file: go.mod | |
cache: true | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # [email protected] | |
with: | |
version: latest | |
only-new-issues: true | |
release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: | |
- test | |
- lint | |
permissions: | |
contents: write | |
packages: write | |
id-token: write # for cosign | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # [email protected] | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # [email protected] | |
with: | |
go-version-file: go.mod | |
cache: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # [email protected] | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # [email protected] | |
- name: Set up Cosign | |
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # [email protected] | |
- name: Log in to the container registry | |
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # [email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release | |
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # [email protected] | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.GH_PAT }} |