v1.7.1 #7
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 | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Debug information | |
run: | | |
echo 'sha: ${{ github.sha }}' | |
echo 'ref: ${{ github.ref }}' | |
# This action will download the artifact for workflow runs that | |
# happen for this actual commit (the commit that the tag points to). | |
# It also restores the files timestamps. | |
- name: Download sdist and wheel from commit ${{ github.sha }} | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: workflow.yml | |
workflow_conclusion: success | |
commit: ${{ github.sha }} | |
name: wheel | |
path: dist | |
- name: Download sdist from commit ${{ github.sha }} | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: workflow.yml | |
workflow_conclusion: success | |
commit: ${{ github.sha }} | |
name: sdist | |
path: dist | |
- name: Display structure of downloaded files | |
working-directory: dist/ | |
run: | | |
ls -R | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
dist/*.whl | |
dist/*.tar.gz | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |