Skip to content

Publish on PyPI - c7349f516fdb0b55491c0de08ee7247db32d5fd0 #10

Publish on PyPI - c7349f516fdb0b55491c0de08ee7247db32d5fd0

Publish on PyPI - c7349f516fdb0b55491c0de08ee7247db32d5fd0 #10

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