Skip to content

RELEASE Updating to v0.8 release #9

RELEASE Updating to v0.8 release

RELEASE Updating to v0.8 release #9

Workflow file for this run

name: "Release to PyPI"
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.type }}
cancel-in-progress: true
on:
release:
types: [published]
push:
branches:
- main
workflow_run:
workflows: [Build_Wheels]
types:
- completed # This ensures it triggers only after the workflow completes
pull_request:
branches:
- main
permissions:
contents: read
jobs:
check_wheels:
runs-on: ubuntu-latest
steps:
- name: Get run ID of "Test" workflow
id: get-run-id
run: |
OTHER_REPO="${{ github.repository }}"
WF_NAME="Build_Wheels"
RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow ${WF_NAME} --json databaseId --jq .[0].databaseId`
echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}"
echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ github.token }}
- name: Download artifact from "Build_Wheels" workflow
uses: actions/download-artifact@v4
with:
name: dist # Match name used in test.yml upload artifact step
github-token: ${{ github.token }}
repository: ${{ github.repository }}
run-id: ${{ steps.get-run-id.outputs.run-id }}
- name: Show downloaded files
run: ls -la
# PyPI on release
pypi:
needs: [check_wheels]
runs-on: ubuntu-latest
if: github.event_name == 'release'
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1