Skip to content

update github workflows #52

update github workflows

update github workflows #52

Workflow file for this run

name: goreleaser
on:
push:
branches:
- main
tags:
- '*'
pull_request:
types: [opened, reopened, synchronize]
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21.4
- name: Run GoReleaser release (SKIP publish)
uses: goreleaser/goreleaser-action@v5
if: startsWith(github.ref, 'refs/tags/') != true
with:
distribution: goreleaser
version: latest
args: release --rm-dist --skip-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser release
uses: goreleaser/goreleaser-action@v5
if: startsWith(github.ref, 'refs/tags/')
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}