Skip to content

Release

Release #11

Workflow file for this run

---
name: Release
on:
workflow_dispatch:
inputs:
tag:
description: "Tag"
required: true
default: ""
prerelease:
type: choice
description: "Pre-Release?"
required: true
options:
- true
- false
default: true
jobs:
release:
runs-on: ubuntu-latest
env:
PRERELEASE: ${{ github.event.inputs.prerelease }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Tag
run: |
if ! [[ ${{ github.event.inputs.tag }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Tag needs to be vX.Y.Z, e.g. v1.2.3"
exit 1
fi
git tag ${{ github.event.inputs.tag }}
git push origin ${{ github.event.inputs.tag }}
- name: Setup Go
uses: actions/setup-go@v4
- name: Build
run: |
go build -v ./...
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ fromJSON(env.PRERELEASE) }}
name: ${{ github.event.inputs.tag }}
tag_name: ${{ github.event.inputs.tag }}
fail_on_unmatched_files: true
generate_release_notes: true