GitHub workflow release build configuration #1
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 release | |
on: | |
release: | |
types: | |
- published | |
push: | |
branches: | |
- develop | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
TWINE_NON_INTERACTIVE: "true" | |
steps: | |
- | |
name: Checkout repository | |
uses: actions/checkout@v2 | |
- | |
name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
architecture: x64 | |
- | |
name: Install dependencies | |
run: | | |
python3 -m venv ./venv && \ | |
source venv/bin/activate && \ | |
pip install --upgrade pip && \ | |
pip install --upgrade build && \ | |
pip install twine | |
- | |
name: Build and release | |
run: | | |
source venv/bin/activate && \ | |
python -m build && \ | |
python -m twine check dist/* |