Restore/pre 0.9.3 backlog #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Gate | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: [main] | |
| paths: ['.releases/**'] | |
| concurrency: | |
| group: release-gate | |
| cancel-in-progress: false | |
| jobs: | |
| create-release-tag: | |
| name: Create tag and dispatch release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| if: github.event.pull_request.merged == true | |
| permissions: | |
| contents: write | |
| actions: write | |
| steps: | |
| - name: Fail if App credentials are not configured | |
| run: | | |
| if [ -z "${{ secrets.APP_ID }}" ] || [ -z "${{ secrets.APP_PRIVATE_KEY }}" ]; then | |
| echo "❌ APP_ID and APP_PRIVATE_KEY must be configured." | |
| echo "For fork testing, install a personal GitHub App on the fork," | |
| echo "create a private key, and add both as repository secrets." | |
| exit 1 | |
| fi | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/create-github-app-token@v3 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Install Python deps | |
| run: pip install pyyaml | |
| - name: Create tag from release request | |
| id: gate | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| REPO: ${{ github.repository }} | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }} | |
| run: | | |
| python .github/workflows/release/release.py gate | tee /tmp/gate-output.txt | |
| TAG=$(grep '^tag=' /tmp/gate-output.txt | tail -1 | cut -d= -f2-) | |
| COMMIT=$(grep '^commit=' /tmp/gate-output.txt | tail -1 | cut -d= -f2-) | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| echo "commit=$COMMIT" >> $GITHUB_OUTPUT | |
| if [ -z "$TAG" ] || [ -z "$COMMIT" ]; then | |
| echo "❌ gate did not emit tag= / commit= outputs" | |
| exit 1 | |
| fi | |
| echo "Gate outputs: $TAG @ $COMMIT" | |
| - name: Dispatch release workflow | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh workflow run release.yml \ | |
| --ref main \ | |
| -f tag=${{ steps.gate.outputs.tag }} |