-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.04 KB
/
publish-pypi.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
name: Publish to PyPI
on:
workflow_run:
workflows: ["Run Code Checks"]
branches: [develop]
types:
- completed
jobs:
publish-pypi:
if: |
github.repository == 'opendatacube/odc-dscache'
&& github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: wheels_cache
with:
path: ./wheels
key: wheels-${{ github.sha }}
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Install Twine
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --upgrade \
toml \
wheel \
twine
python -m pip freeze
- name: Upload to PyPI
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TWINE_USERNAME: __token__
run: |
ls wheels/clean/
twine upload --non-interactive --skip-existing wheels/clean/*