Skip to content

Commit

Permalink
switch to goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
James Oulman committed Dec 28, 2021
1 parent 31db063 commit 2df012c
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 15 deletions.
39 changes: 24 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
# .github/workflows/release.yaml
name: goreleaser

on:
release:
types: [created]

permissions:
contents: write

jobs:
releases-matrix:
name: Release Go Binary
goreleaser:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64]
steps:
- uses: actions/checkout@v2
- uses: wangyoucao577/[email protected]
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "1.16"
binary_name: "terraform-credentials-vault"
extra_files: LICENSE README.md
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/release.yml.off
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# .github/workflows/release.yaml

on:
release:
types: [created]

jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64]
steps:
- uses: actions/checkout@v2
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "1.16"
binary_name: "terraform-credentials-vault"
extra_files: LICENSE README.md
10 changes: 10 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
project_name: terraform-credentials-vault
builds:
- env: [CGO_ENABLED=0]
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64

0 comments on commit 2df012c

Please sign in to comment.