Merge pull request #51 from linw1995/develop #10
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: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up PDM | |
uses: pdm-project/[email protected] | |
with: | |
python-version: 3.8 | |
- name: Build release | |
run: | | |
pdm build | |
- name: Upload release | |
uses: actions/upload-artifact@v1 | |
with: | |
name: dist | |
path: dist | |
- name: Publish release to PYPI | |
run: | | |
pip install twine | |
twine upload -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --verbose dist/* | |
- name: Publish release to GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: dist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |