Skip to content

chore(ci)(deps): bump actions/upload-artifact from 4 to 7 #3

chore(ci)(deps): bump actions/upload-artifact from 4 to 7

chore(ci)(deps): bump actions/upload-artifact from 4 to 7 #3

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: gofmt
run: |
unformatted=$(gofmt -l .)
if [[ -n "${unformatted}" ]]; then
echo "::error::gofmt found unformatted files:"
echo "${unformatted}"
exit 1
fi
- name: go vet
run: go vet ./...
- name: go mod verify
run: go mod verify
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=5m
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Build
run: go build -v ./...
- name: Test
run: go test -race -covermode=atomic -coverprofile=coverage.out ./...
- name: Smoke test — stakecli version
shell: bash
run: |
go build -o stakecli-ci ./cmd/stake
./stakecli-ci version
- name: Upload coverage
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v7
with:
name: coverage
path: coverage.out
if-no-files-found: ignore
goreleaser-check:
name: GoReleaser (snapshot)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Validate .goreleaser.yaml
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: check
- name: Build snapshot (cross-compile, skip macOS signing on linux)
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --snapshot --clean --skip=publish
- name: Upload snapshot artifacts
uses: actions/upload-artifact@v7
with:
name: snapshot-dist
path: |
dist/*.tar.gz
dist/*.zip
dist/*.deb
dist/*.rpm
dist/*_checksums.txt
if-no-files-found: warn
retention-days: 7