Skip to content

deploy

deploy #4

Workflow file for this run

name: deploy
on:
release:
workflow_dispatch:
jobs:
deploy:
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-constant-velocity
[pypi]
repository: https://upload.pypi.org/legacy/
username: __token__
password: $env:TWINE_API_KEY
[navigate-constant-velocity]
repository: https://upload.pypi.org/legacy/
username: __token__
password: $env:TWINE_API_KEY
"@ | 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-constant-velocity dist/*