Skip to content

fix: wait works when no conditions set (#40) #7

fix: wait works when no conditions set (#40)

fix: wait works when no conditions set (#40) #7

Workflow file for this run

name: Publish Release
on:
push:
tags:
- 'v*.*.*'
- '!v*.*.*-*' # Exclude pre-releases
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g., v1.0.0)'
required: true
type: string
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write # Permission for keyless signing
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ inputs.tag || '' }}
- name: Validate release tag
run: |
if [ "${{ github.event_name }}" = "push" ]; then
VERSION="${{ github.ref_name }}"
else
VERSION="${{ inputs.tag }}"
fi
make validate-release-tag VERSION="$VERSION"
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Run tests
run: make test
- name: Install cosign
uses: sigstore/cosign-installer@v4.1.1
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}