Add GithubAction for release

This commit is contained in:
Neeraj Gupta 2023-10-23 21:42:23 +05:30
parent 8ccac7b634
commit 9b5edd1599

28
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: Release
on:
push:
tags:
- 'v*.*.*' # This will run the workflow when you push a new tag in the format v0.0.0
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Important to ensure that GoReleaser works correctly
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17 # You can adjust the Go version here
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use the provided GITHUB_TOKEN secret