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