Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AvikantSrivastava committed Sep 11, 2021
1 parent 111cbc6 commit 20cc254
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,31 @@
name: goreleaser
name: Release Go project

on:
pull_request:
push:

permissions:
contents: write
tags:
- "*" # triggers only if push new tag version, like `0.8.4` or else

jobs:
goreleaser:
build:
name: GoReleaser build
runs-on: ubuntu-latest

steps:
-
name: Checkout
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/

- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: 1.17
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
go-version: 1.14
id: go

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }}

0 comments on commit 20cc254

Please sign in to comment.