Skip to content

Commit

Permalink
Added goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
aurimasniekis committed Feb 1, 2021
1 parent 039cb54 commit 4177583
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,15 @@ jobs:
# step 1: checkout repository code
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0

# step 2: generate build files
- name: Generate build files
uses: thatisuday/go-build-action@v1
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
platforms: "linux/amd64, darwin/amd64, windows/amd64"
name: "pz"
compress: "true"
dest: "dist"

# step 3: upload build-artifacts
- name: Upload build-artifacts
uses: skx/github-action-publish-binaries@master
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: "./dist/*.tar.gz"
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
56 changes: 56 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
builds:
- binary: pz
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

brews:
-
name: pz
# GOARM to specify which 32-bit arm version to use if there are multiple versions
# from the build section. Brew formulas support atm only one 32-bit version.
# Default is 6 for all artifacts or each id if there a multiple versions.
goarm: 6

tap:
owner: project-zer0
name: homebrew-tap
# Optionally a token can be provided, if it differs from the token provided to GoReleaser
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"

url_template: "https://github.com/project-zer0/pz-launcher/releases/download/{{ .Tag }}/{{ .ArtifactName }}"

commit_author:
name: goreleaserbot
email: [email protected]

folder: Formula

homepage: "https://github.com/project-zer0/pz-launcher"

description: "A project-zer0/pz launcher"

license: "MIT"

custom_block: |
head "https://github.com/project-zer0/pz-launcher.git"

0 comments on commit 4177583

Please sign in to comment.