fork-release-published #566
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: Aggregate wheels and update PEP 503 index | |
| # This workflow: | |
| # 1. Scans all fork repos for riscv64 wheel releases | |
| # 2. Downloads new wheels not yet in the central release | |
| # 3. Creates/updates a dated central release with all wheels | |
| # 4. Regenerates the PEP 503 simple index on GitHub Pages | |
| # | |
| # Triggers: | |
| # - Daily at 6 AM UTC (after nightly builds complete) | |
| # - Manual dispatch | |
| # - repository_dispatch from fork workflows after they publish a release | |
| on: | |
| schedule: | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: | |
| repository_dispatch: | |
| types: [fork-release-published] | |
| concurrency: | |
| group: aggregate-release | |
| cancel-in-progress: false | |
| jobs: | |
| aggregate-and-index: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Aggregate wheels from fork releases | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bash scripts/aggregate-wheels.sh | |
| - name: Determine release tag | |
| id: tag | |
| run: | | |
| TAG=$(gh release list --repo gounthar/riscv64-python-wheels --limit 1 --json tagName --jq '.[0].tagName' 2>/dev/null || echo "") | |
| if [ -z "$TAG" ]; then | |
| TAG="v$(date -u +%Y.%m.%d)-cp313" | |
| fi | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| echo "Using release tag: $TAG" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate PEP 503 index from downloaded wheels | |
| run: python scripts/generate-index.py wheels . "${{ steps.tag.outputs.tag }}" | |
| - name: Deploy index to gh-pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./simple | |
| destination_dir: simple |