Skip to content

Ensure inputs are validated #29

Ensure inputs are validated

Ensure inputs are validated #29

Workflow file for this run

name: Create release
permissions:
contents: write
on:
workflow_dispatch:
inputs:
version:
description: "The release version"
required: true
type: string
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Tag version
if: github.event_name == 'workflow_dispatch'
run: |
git fetch --force --tags
git tag --force ${{ github.event.inputs.version }}
- name: Run GoReleaser
if: startsWith(github.ref, 'refs/tags/')
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PAT }}