generated from TheDeanLab/navigate-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.43 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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/*