Skip to content

Release CLI

Release CLI #7

Workflow file for this run

name: Release CLI
# Fallback / manual entry point for building CLI release artifacts.
# The primary build path is now release-please.yml's goreleaser job, which
# runs inline when release-please creates a Release. This workflow exists
# to handle:
# - manually-pushed v* tags (someone tags by hand, bypassing release-please)
# - rebuilds via workflow_dispatch (e.g. backfilling a release whose
# artifacts went missing for any reason)
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Tag to build (e.g. v0.1.5)"
required: true
type: string
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.tag || github.ref_name }}
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Run CLI tests
run: go test -mod=readonly ./apps/cli/...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean --config .goreleaser-cli.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOFLAGS: -mod=readonly