Skip to content

Commit

Permalink
Add GitHub Actions release target, remove go mod tidy in goreleaser c…
Browse files Browse the repository at this point in the history
…onfig
  • Loading branch information
akram committed Oct 11, 2021
1 parent b40c8e8 commit 2647b16
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Release
on:
push:
tags:
- "v*"
jobs:
goreleaser:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
- name: Setup Snapcraft
run: |
sudo snap install snapcraft --classic
snapcraft login --with - <<<"${SNAP_TOKEN}"
env:
SNAP_TOKEN: ${{ secrets.SNAP_LOGIN }}
SNAPCRAFT_BUILD_ENVIRONMENT: host
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- env:
Expand Down

0 comments on commit 2647b16

Please sign in to comment.