Skip to content

Commit e7a1486

Browse files
committed
update pypi workflow
1 parent b5ef8e1 commit e7a1486

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

.github/workflows/upload_pypi.yml

+9-21
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,23 @@
1-
name: upload pypi
1+
name: Publish on pypi.org
22

33
on:
4-
# trigger only on release
5-
release:
6-
types: [published]
7-
# to trigger workflow manually from actions-tab
8-
workflow_dispatch:
4+
release:
5+
types: [published]
96

107
jobs:
118
publish:
12-
name: Upload to PyPI
13-
if: |
14-
startsWith(github.ref, 'refs/tags/v') &&
15-
startsWith(github.repository, 'TUW-GEO')
16-
needs: build
179
runs-on: ubuntu-latest
1810
steps:
19-
- name: Print environment variables
20-
run: |
21-
echo "GITHUB_REF = $GITHUB_REF"
22-
echo "GITHUB_REPOSITORY = $GITHUB_REPOSITORY"
23-
- name: Download Artifacts
24-
uses: actions/download-artifact@v2
25-
- name: Display downloaded files
26-
run: ls -aR
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
- run: python3 -m pip install --upgrade build && python3 -m build
2716
- name: Upload to PyPI
2817
uses: pypa/[email protected]
2918
with:
3019
skip_existing: true
3120
verbose: true
3221
verify_metadata: true
33-
packages_dir: Artifacts/dist/
3422
user: __token__
35-
password: ${{ secrets.PYPI_API_TOKEN }} # this
23+
password: ${{ secrets.PYPI_API_TOKEN }} # this needs to be uploaded to github actions secrets

0 commit comments

Comments
 (0)