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
70 changes: 70 additions & 0 deletions .github/workflows/release-coordinator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release & Version Roll

concurrency:
group: release-safexml
cancel-in-progress: false

on:
workflow_run:
workflows: ["CI"]
branches: [main]
types:
- completed
workflow_dispatch:

jobs:
release:
name: Semantic Release & Version Roll
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: write
actions: write
issues: write
pull-requests: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: "3.12"

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: "20"

- name: Run Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v6
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}

- name: Dispatch Downstream Package Releases
if: steps.semantic.outputs.new_release_published == 'true'
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
HAS_PAT: ${{ secrets.PAT_TOKEN != '' }}
run: |
if [ "$HAS_PAT" = "true" ]; then
echo "Release was published with PAT_TOKEN; downstream 'on: release' workflows are automatically triggered by GitHub. Skipping manual dispatch to prevent duplicate builds."
exit 0
fi
NEW_TAG="v${{ steps.semantic.outputs.new_release_version }}"
echo "Dispatching release.yml for $NEW_TAG (fallback when running without PAT)..."
gh workflow run release.yml --ref "$NEW_TAG" || echo "Note: release.yml dispatch skipped or handled by release event"
161 changes: 0 additions & 161 deletions .github/workflows/release-pypi.yml

This file was deleted.

Loading
Loading