mirror of
https://github.com/cooperspencer/gickup.git
synced 2026-10-19 16:16:46 +00:00
* chore: bump action versions in workflows to latest stable releases * fix: add revive var-naming exclusion for zip_test.go * fix: correct formatting and structure in .goreleaser.yml * fix: ensure fetch-depth is set for actions/checkout in workflow * fix: update GoReleaser conditions for tag-based releases in workflow
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
tags:
|
|
- '*'
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.26
|
|
|
|
- name: Test
|
|
run: go test -v ./...
|
|
|
|
- name: Run GoReleaser
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: goreleaser/goreleaser-action@v7
|
|
with:
|
|
# either 'goreleaser' (default) or 'goreleaser-pro'
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run GoReleaser
|
|
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
|
uses: goreleaser/goreleaser-action@v7
|
|
with:
|
|
# either 'goreleaser' (default) or 'goreleaser-pro'
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --snapshot --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload a Build Artifact
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: gickup
|
|
path: dist/*
|