v0.1.9 #17
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
| # This workflow will publish a python package on pypi, when a release is created | |
| name: release | |
| on: | |
| release: | |
| types: [ published ] | |
| jobs: | |
| build: | |
| outputs: | |
| version: ${{ steps.docs-version-step.outputs.version }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies | |
| run: | | |
| make dev-dependencies | |
| - name: Build package | |
| run: | | |
| uv build | |
| - name: Archive the dist folder | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| retention-days: 1 | |
| - name: Export version for site docs | |
| id: docs-version-step | |
| run: | | |
| ./scripts/docs-version.sh | |
| echo "Identified version: $(./scripts/docs-version.sh)" | |
| echo "version=$(./scripts/docs-version.sh)" | |
| echo "version=$(./scripts/docs-version.sh)" >> $GITHUB_OUTPUT | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Download the dist folder from the build job | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Upload binaries to release | |
| uses: shogo82148/actions-upload-release-asset@v1 | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: dist/* | |
| - name: Publish package distributions to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| ################################ | |
| # REMOVE CUSTOM REPOSITORY TO # | |
| # PUBLISH ON OFFICIAL PYPI # | |
| ################################ | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| site: | |
| needs: build | |
| uses: ./.github/workflows/reusable-github-pages.yml | |
| permissions: | |
| contents: write | |
| with: | |
| site-version: ${{ needs.build.outputs.version }} | |
| version-alias: "stable" | |
| set-default: true |