Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
test goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Spurrier committed Dec 16, 2022
1 parent ebb3aa4 commit 326cc5f
Showing 1 changed file with 30 additions and 27 deletions.
57 changes: 30 additions & 27 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
# .github/workflows/release.yaml
name: goreleaser

on:
release:
types: [created]
push:
tags:
- '*'

jobs:
releases-matrix:
name: Release Go Binary
goreleaser:
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux, windows, darwin, freebsd]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "latest"
project_path: "/cmd/purge"
executable_compression: "upx -qq --brute"
ldflags: "-s -w -X main.Version=${{ matrix.release_tag }}"
binary_name: "purge"
extra_files: LICENSE README.md
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v3
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist
workdir: twitterpurge
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

-
name: Upload assets
uses: actions/upload-artifact@v3
with:
name: twitterpurge
path: twitterpurge/dist/*

0 comments on commit 326cc5f

Please sign in to comment.