Skip to content

Commit

Permalink
add goreleaser yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanut Lertwarachai authored and Tanut Lertwarachai committed Jan 24, 2025
1 parent a4013f8 commit 015299b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 26 deletions.
27 changes: 1 addition & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,10 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
go-version: '1.22.3'

- name: setup release environment
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: release publish
run: make release

# upload linux_amd64 binaries
- name: upload binaries
uses: actions/upload-artifact@v4
with:
name: falcon_linux_amd64
path: ./build/falcon_linux_amd64

# upload darwin_amd64 binaries
- name: upload binaries
uses: actions/upload-artifact@v4
with:
name: falcon_darwin_amd64
path: ./build/falcon_darwin_amd64

# upload windows_amd64 binaries
- name: upload binaries
uses: actions/upload-artifact@v4
with:
name: falcon_windows_amd64
path: ./build/falcon_windows_amd64



32 changes: 32 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .goreleaser.yml
project_name: falcon

builds:
- id: linux_amd64
goos: linux
goarch: amd64
binary: falcon_linux_amd64
- id: darwin_amd64
goos: darwin
goarch: amd64
binary: falcon_darwin_amd64
- id: windows_amd64
goos: windows
goarch: amd64
binary: falcon_windows_amd64

archives:
- id: golang-cross
builds:
- linux-amd64
- darwin-amd64
- windows_amd64
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
format: tar.gz
wrap_in_directory: true

release:
github:
token: "{{ .Env.GITHUB_TOKEN }}"
draft: true
prerelease: true

0 comments on commit 015299b

Please sign in to comment.