30 lines
773 B
YAML
30 lines
773 B
YAML
name: Publish
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
|
|
env:
|
|
GO_GIT_HOST: gitea.libretechconsulting.com
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/v') # Only run on tag push
|
|
steps:
|
|
- name: Set up Go Environment
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.25'
|
|
|
|
- name: Run Go List
|
|
continue-on-error: true
|
|
env:
|
|
TAG_NAME: ${{ github.ref_name }} # Use the pushed tag name
|
|
run: |
|
|
if [[ "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
GOPROXY=proxy.golang.org go list -m ${GO_GIT_HOST}/${GITHUB_REPOSITORY}@$TAG_NAME
|
|
else
|
|
echo "Error: Invalid tag format '$TAG_NAME'. Expected 'vX.X.X'."
|
|
exit 1
|
|
fi
|