Skip to content

Publish on PyPI - 268efd514692279414e74a7e769b546042bf4045 #11

Publish on PyPI - 268efd514692279414e74a7e769b546042bf4045

Publish on PyPI - 268efd514692279414e74a7e769b546042bf4045 #11

Workflow file for this run

name: Publish on PyPI
run-name: Publish on PyPI - ${{ github.sha }}
on:
release:
types: [published]
jobs:
publish_on_pypi:
name: Publish on PyPI
if: github.event.release.prerelease == false
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/dmri-amico
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GH_PAT }}
run-id: ${{ secrets.WHEELS_ARTIFACTS_RUN_ID }}
path: dist
merge-multiple: true
- name: Publish on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true
print-hash: true
publish_on_pypi_test:
name: Publish on PyPI Test
if: github.event.release.prerelease == true && contains(github.event.release.tag_name, 'rc')
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/project/dmri-amico
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GH_PAT }}
run-id: ${{ secrets.WHEELS_ARTIFACTS_RUN_ID }}
path: dist
merge-multiple: true
- name: Publish on PyPI Test
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
verbose: true
print-hash: true