Skip to content

Commit

Permalink
Added GoReleaser Github action (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ezodude authored May 9, 2022
1 parent 681d63f commit a32b30d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: goreleaser
on:
push:
branches:
- main
tags:
- v**
jobs:
release-kubectl-artillery-plugin:
runs-on: ubuntu-latest

permissions:
contents: write
packages: write

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Fetch all tags
run: git fetch --force --tags

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18

- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: success() && startsWith(github.ref, 'refs/tags/')
with:
distribution: goreleaser
version: latest
args: release --debug --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ archives:
- LICENSE.txt
wrap_in_directory: "true"
gomod:
proxy: true
proxy: false
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down

0 comments on commit a32b30d

Please sign in to comment.