Skip to content

Exiting linkspan when the workflow fails #116

Exiting linkspan when the workflow fails

Exiting linkspan when the workflow fails #116

Workflow file for this run

name: goreleaser
on:
pull_request:
push:
release:
types: [published]
permissions:
contents: write
jobs:
dry-run:
name: GoReleaser dry-run (push & PR)
if: github.event_name != 'release'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
- name: Validate GoReleaser config
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser (snapshot)
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILT_BY: snapshot
publish:
name: GoReleaser publish (release)
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
- name: Run GoReleaser (publish)
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILT_BY: github-release
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}