Skip to content

v0.0.9-alpha2

v0.0.9-alpha2 #37

Workflow file for this run

name: Publish Python Package
on:
release:
types: [published]
jobs:
pypi-publish:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
contents: read
# Dedicated environments with protections for publishing are strongly recommended.
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
environment:
name: pypi
url: https://pypi.org/project/intrynzic-raptor/
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
# url: https://pypi.org/p/YOURPROJECT
#
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
# ALTERNATIVE: exactly, uncomment the following line instead:
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
steps:
- name: Retrieve release distributions
uses: dawidd6/action-download-artifact@v3
with:
workflow: build.yml
workflow_conclusion: success
name: release-dists-.*
name_is_regexp: true
# merge_multiple: true # Not currently working for some reason, even though its supposed to be!
path: dist/
if_no_artifact_found: error
# NOTE: This is only required since merge_multiple in dawidd6/action-download-artifact is currently not working
- name: Flatten distributions
run: |
find dist/ -mindepth 2 -type f -name "*.whl" -exec mv -t dist/ {} +
find dist/ -mindepth 1 -type d -delete
- name: Verify distributions
run: ls -lh dist
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/