Skip to content

deploy

deploy #12

Workflow file for this run

name: deploy
on:
release:
workflow_dispatch:
jobs:
deploy:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
python-version: ["3.9"]
operating-system: [windows-latest]
steps:
- uses: actions/checkout@v3
- name: Create .pypirc file
shell: pwsh
run: |
@"
[distutils]
index-servers =
pypi
navigate-micro
[pypi]
repository: https://upload.pypi.org/legacy/
username: $env:PYPI_USERNAME
password: $env:PYPI_PASSWORD
[navigate-micro]
repository: https://upload.pypi.org/legacy/
username: $env:PYPI_USERNAME
password: $env:PYPI_PASSWORD
"@ | Set-Content -Path $env:USERPROFILE\.pypirc
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: |
git tag
python -m build
twine upload -r navigate-micro dist/*