Skip to content

Commit

Permalink
Trying to add a go-releaser whatever that is
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Dec 16, 2024
1 parent 6e7e845 commit d527fa5
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test Release
on:
push:
tags:
- 'test-release*' # Only triggers on tags starting with 'test-release'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Fetch All Tags
run: git fetch --force --tags
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: '1.18.1'
- name: Run GoReleaser (Skip Publishing)
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist --skip-publish # Test the build without creating a release
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 @@
before:
hooks:
- go mod tidy

builds:
- dir: cmd
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
- format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE
- README.md

checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ .Tag }}-SNAPSHOT"

release:
draft: true # Create releases as drafts to avoid cluttering public release history
prerelease: true # Mark the releases as pre-releases (useful for distinguishing test releases)

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

0 comments on commit d527fa5

Please sign in to comment.