Skip to content

feat: Add remote URI support, default local path, release automation,… #4

feat: Add remote URI support, default local path, release automation,…

feat: Add remote URI support, default local path, release automation,… #4

Workflow file for this run

name: GoReleaser
on:
push:
tags:
- 'v*' # Trigger on tags like v0.1.0, v1.2.3, etc.
permissions:
contents: write # Needed to create releases and upload assets
packages: write # Optional: if you publish to GitHub Packages
# id-token: write # Optional: if you use OIDC for authentication
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history so goreleaser can generate changelog
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23' # Use the Go version from your go.mod or newer
# Optional: Cache Go modules to speed up builds
- name: Go Cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# Optional: Run tests before releasing
# - name: Run tests
# run: go test ./...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# Optional: set the version to use (defaults to latest)
# version: latest
args: release --clean
env:
# GITHUB_TOKEN is automatically provided by GitHub Actions
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Optional: If you need to sign artifacts
# GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}