1.1.0 🌍 VPNs, WANs and tests #64
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: | |
release: | |
types: [published] | |
env: | |
DEFAULT_PYTHON: 3.11 | |
jobs: | |
deploy: | |
name: Build & Publish PyPI package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
- name: Setup Python ${{ env.DEFAULT_PYTHON }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
- name: Cache pip dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install pytest | |
pip install build twine | |
- name: Run tests | |
run: pytest | |
- name: Build package | |
run: python -m build | |
- name: Publish package | |
run: | | |
export TWINE_USERNAME="__token__" | |
export TWINE_PASSWORD="${{ secrets.TWINE_TOKEN }}" | |
twine upload dist/* --skip-existing || exit 1 |