fix(ci): use compatible action versions for Forgejo runner
Some checks failed
ci / build (push) Failing after 1m4s

- Downgrade actions/setup-go from v6 to v5 (node24 not supported)
- Downgrade goreleaser-action from v6 to v5
- Add CI workflow with goreleaser snapshot on push to main
- Add .goreleaser.yaml configuration
This commit is contained in:
Manuel Ganter 2026-02-04 14:46:51 +01:00
parent ddaf5fbd0f
commit 820ebb72ac
No known key found for this signature in database
3 changed files with 76 additions and 3 deletions

32
.github/workflows/ci.yaml vendored Normal file
View file

@ -0,0 +1,32 @@
name: ci
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Lint
run: make lint
- name: Test
run: make test
- name: GoReleaser Check
uses: https://github.com/goreleaser/goreleaser-action@v5
with:
args: release --snapshot --skip=publish --clean

View file

@ -14,9 +14,9 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ">=1.25.1"
go-version-file: go.mod
- name: Test code
run: make test
- name: Import GPG key
@ -26,7 +26,7 @@ jobs:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Run GoReleaser
uses: https://github.com/goreleaser/goreleaser-action@v6
uses: https://github.com/goreleaser/goreleaser-action@v5
env:
GITEA_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

41
.goreleaser.yaml Normal file
View file

@ -0,0 +1,41 @@
version: 2
project_name: resource-collector
before:
hooks:
- go mod tidy
builds:
- id: resource-collector
main: ./cmd/collector
binary: resource-collector
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
archives:
- id: default
format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
checksum:
name_template: checksums.txt
snapshot:
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"