v0.7.5 #33
Workflow file for this run
This file contains 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: Publish Package | |
on: | |
release: | |
types: [ released ] | |
permissions: | |
contents: read | |
packages: read | |
pages: write | |
id-token: write | |
jobs: | |
run-tests: | |
name: Tests | |
uses: ./.github/workflows/PackageTest.yml | |
secrets: inherit | |
build-docs: | |
name: Docs | |
needs: run-tests | |
uses: ./.github/workflows/DocumentationBuild.yml | |
secrets: inherit | |
publish-package: | |
name: Publish Distribution | |
needs: build-docs | |
runs-on: ubuntu-latest | |
environment: ${{ matrix.environment }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- host: https://py00.crc.pitt.edu | |
environment: publish-h2p | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: false | |
# Get the new package version from the release tag | |
# Git release tags are expected to start with "refs/tags/v" | |
- name: Set package version | |
run: | | |
release_tag=${{github.ref}} | |
poetry version "${release_tag#refs/tags/v}" | |
- name: Build package | |
run: poetry build -v | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
print-hash: true | |
repository-url: ${{ matrix.host }} | |
user: ${{ secrets.REPO_USER }} | |
password: ${{ secrets.REPO_PASSWORD }} | |
publish-docs: | |
name: Deploy Documentation | |
needs: [ build-docs, publish-package ] | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |