Update to 2.2.12 #13
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: Upload Python Package | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- '*' | |
jobs: | |
release: | |
name: Create Release | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@master | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
name: Release ${{ github.ref }} | |
body_path: CHANGELOG.md | |
draft: false | |
prerelease: false | |
build-n-publish: | |
name: Build and publish to PyPI | |
needs: release | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install setuptools wheel twine | |
if (Test-Path requirements.txt) { pip install -r requirements.txt } | |
- name: Install pypa/build | |
run: | | |
python -m pip install build --user | |
- name: Build binary wheel and source tarball | |
run: | | |
python -m build --sdist --wheel --outdir dist/ | |
- name: Publish to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
python -m twine upload dist/* | |