deploy #193
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
# This workflow will deploy the Python package to PyPi.org | |
name: deploy | |
env: | |
package: tinyscript | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**/VERSION.txt' | |
workflow_run: | |
workflows: ["build"] | |
types: [completed] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Cleanup README | |
run: | | |
sed -ri 's/^(##*)\s*:.*:\s*/\1 /g' README.md | |
awk '{if (match($0,"## Supporters")) exit; print}' README.md > README | |
mv -f README README.md | |
- run: python3 -m pip install --upgrade build && python3 -m build | |
- name: Upload ${{ env.package }} to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
verbose: true | |
verify_metadata: false |