Skip to content

Commit

Permalink
feat: release binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Aug 24, 2024
1 parent e043e3a commit d58f51f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
branches:
- main
name: Release
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: cashapp/activate-hermit@v1
- uses: charlesthomas/[email protected]+2.1.1
id: svu
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
git tag ${{ steps.svu.outputs.next }}
goreleaser release --fail-fast
git push --tags
if: ${{ steps.svu.outputs.changed }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 2
project_name: scaffolder
release:
github:
owner: TBD54566975
name: scaffolder
brews:
-
install: bin.install "scaffolder"
env:
- CGO_ENABLED=0
builds:
- goos:
- linux
- darwin
- windows
goarch:
- arm64
- amd64
goarm:
- "6"
dir: ./cmd/scaffolder
main: .
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
binary: scaffolder
archives:
-
format: tar.gz
name_template: '{{ .Binary }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
files:
- LICENSE
- README*
snapshot:
version_template: SNAPSHOT-{{ .Commit }}
checksum:
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/goreleaser

0 comments on commit d58f51f

Please sign in to comment.