36 lines
860 B
YAML
36 lines
860 B
YAML
name: Release Candidate
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
tag:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with: { fetch-depth: 0 }
|
|
- name: Auto-tag RC
|
|
run: |
|
|
set -e
|
|
TAG="rc-${{ github.run_number }}"
|
|
git tag "$TAG" || true
|
|
git push origin "$TAG" || true
|
|
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
|
|
|
|
draft:
|
|
runs-on: ubuntu-latest
|
|
needs: tag
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with: { fetch-depth: 0 }
|
|
- name: Draft release
|
|
run: |
|
|
set -e
|
|
TAG="${{ needs.tag.outputs.tag }}"
|
|
gh release create "$TAG" --draft --title "RC $TAG" --notes "Automated release candidate." || true
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|