Skip to content

Merge pull request #5 from gokern/rework-run-error-contract #5

Merge pull request #5 from gokern/rework-run-error-contract

Merge pull request #5 from gokern/rework-run-error-contract #5

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
name: GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: go.mod
check-latest: true
- name: Verify tag points to a passing build
run: |
go mod verify
go vet ./...
go test -race ./...
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
tag="${GITHUB_REF_NAME}"
prerelease_flag=""
case "$tag" in
*-*) prerelease_flag="--prerelease" ;;
esac
gh release create "$tag" \
--title "$tag" \
--generate-notes \
--verify-tag \
$prerelease_flag