-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
113e6d0
commit 109078e
Showing
2 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
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 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/*.tar.gz | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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