Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
35 lines
734 B
YAML
35 lines
734 B
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Validate release tag
|
|
env:
|
|
TAG: ${{ github.ref_name }}
|
|
run: |
|
|
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
echo "Release tags must use vMAJOR.MINOR.PATCH (received: $TAG)" >&2
|
|
exit 1
|
|
fi
|
|
|
|
publish:
|
|
needs: validate
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Create source release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
TAG: ${{ github.ref_name }}
|
|
run: gh release create "$TAG" --verify-tag --generate-notes --title "$TAG"
|