mirror of
https://github.com/ivuorinen/f2b.git
synced 2026-01-26 03:13:58 +00:00
* chore(deps): update github actions and pre-commit hooks * chore(pre-commit): replace dnephin/pre-commit-golang with local hook The dnephin/pre-commit-golang repository has been sunset. Replace it with a local hook that runs golangci-lint directly using the system language. This removes the external dependency while maintaining identical linting behavior via .golangci.yml configuration. * fix: golangci-lint installation * chore: update actions, update golangci in makefile * chore: add goenv bin to path * chore: tweaks to lint tool installation * chore: actually modify pr-lint action * fix(ci): tweaks to linting, permissions * chore(ci): align golangci-lint version to v2.7.2 * chore(ci): update github actions to latest versions * fix(ci): add install-mode for golangci-lint v2.7.2 * fix(security): use go install for golangci-lint
60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
name: Release with GoReleaser
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
attestations: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0 # Required for changelog generation
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- name: Install GoReleaser
|
|
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
|
|
with:
|
|
install-only: true
|
|
version: "~> v2"
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
|
|
with:
|
|
version: "~> v2"
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# Optional: Token for homebrew tap if you have a separate repo
|
|
# HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
|
|
|
|
- name: Upload Release Assets
|
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
|
with:
|
|
name: release-artifacts
|
|
path: dist/
|
|
retention-days: 7
|