Skip to content

Commit

Permalink
Create go-releaser.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bishal7679 committed May 14, 2023
1 parent aca7962 commit 84a808a
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/go-releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: goreleaser

on:
push:
tags:
- 'v*'

permissions:
contents: write
id-token: write

jobs:
goreleaser:
runs-on: ubuntu-latest
environment: goreleaser
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Install Cosign
uses: sigstore/cosign-installer@main

- name: Set the value
id: set_environment
run: |
echo "CURR_DATE=$(date '+%d-%m-%Y')" >> $GITHUB_ENV
echo "CURR_VER=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DATE: ${{ env.CURR_DATE }}
VERSION: ${{ env.CURR_VER }}

0 comments on commit 84a808a

Please sign in to comment.