Skip to content

Commit

Permalink
Merge pull request #5 from fraunhoferfokus/development
Browse files Browse the repository at this point in the history
* try goreleaser
  • Loading branch information
JGottschick authored May 2, 2024
2 parents c6f53b6 + 952a67f commit 707ae62
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 38 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/go.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will publish the artifacts with goreleaser
name: Release

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: write
packages: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.22
cache: true
- name: Set up tools
run: |
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/a-h/templ/cmd/templ@latest
- name: Templ
run: templ generate web/pages/*.templ
- uses: goreleaser/goreleaser-action@v5
with:
version: v1.24.0
args: release --clean
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
51 changes: 51 additions & 0 deletions generator/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
builds:
- env:
- CGO_ENABLED=0
dir: .
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- -s -w
goos:
- linux
- windows
- darwin

checksum:
name_template: 'checksums.txt'

signs:
- id: checksums
cmd: cosign
stdin: '{{ .Env.COSIGN_PASSWORD }}'
output: true
artifacts: checksum
args:
- sign-blob
- --yes
- --key
- env://COSIGN_PRIVATE_KEY
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'

archives:
- format: tar.gz
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
snapshot:
name_template: "{{ incpatch version }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit 707ae62

Please sign in to comment.