Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: true

Expand All @@ -32,10 +32,13 @@ jobs:
- name: Install protoc
run: sudo provisioning/protoc.sh

- name: Setup just
uses: extractions/setup-just@v3
with:
just-version: 1.40.0
- name: Install just
run: cargo install just --version 1.40.0 --locked
env:
CARGO_TARGET_DIR: /tmp/cargo-install-just

- name: Add cargo bin to PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Check compilation
run: cargo check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/release-gate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
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 }}
Loading
Loading