Skip to content

Commit 31ffc6d

Browse files
committed
Issue #252 test version of Github workflow to publish to PyPI
also related to Open-EO/openeo-aggregator#171
1 parent 62c582f commit 31ffc6d

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Based on https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
2+
3+
name: publish to test.pypi
4+
5+
on: [workflow_dispatch]
6+
7+
jobs:
8+
build:
9+
name: Build distribution 📦
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
persist-credentials: false
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.x"
20+
- name: Install pypa/build
21+
run: python3 -m pip install build --user
22+
- name: Build a binary wheel and a source tarball
23+
run: python3 -m build
24+
- name: Store the distribution packages
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: python-package-distributions
28+
path: dist/
29+
30+
publish-to-testpypi:
31+
name: Publish distribution 📦 to TestPyPI
32+
needs:
33+
- build
34+
runs-on: ubuntu-latest
35+
environment:
36+
name: testpypi
37+
url: https://test.pypi.org/p/openeo-driver
38+
permissions:
39+
id-token: write
40+
41+
steps:
42+
- name: Download all the dists
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: python-package-distributions
46+
path: dist/
47+
- name: Publish distribution 📦 to TestPyPI
48+
uses: pypa/gh-action-pypi-publish@release/v1
49+
with:
50+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)