Skip to content

Commit 4300476

Browse files
🐛 (#119)
* update workflow before publishing python package * fix dependency issue and bump version * point to website in project description * fix broken dependency * improve doc * add github token to download artifacts * ensure only read-access @wvangeit * yet another attempt at downloading artifacts * make sure to use repo that ran the trigger wf * another attempt at fixing * change owner * allow publishing to testpypi also when pr * minor change * revert minor (but breaking) change * minor fix * add debug messages * another debug message * hopefully the final version * final fix * minor fix * move master and tag to individual jobs * add debug messages * dev->post * add python script for determining semantic version * minor changes * minor changes * improve error handling and add version file to artifacts * check if release * minor fix * ensure to enter venv * also when tagging * source venv in publishin workflow * ensure only master * add script for testing 'pure' semver * adapt workflows to new python script * minor change * attempt to evaluate expressions correctly * several fixes to fix tests * ensure repo is checked out in publish workflow * several small fixes * cleanup * debug * minor cleanup * mionr changes * add debug message * minor change * minor change * yet another try * minor change * minor change * minor change * mionr change * minor changes * correct workflow run id * cosmetic change * avoid using gh * change to a single job for publishing
1 parent 132b7ae commit 4300476

File tree

1 file changed

+5
-52
lines changed

1 file changed

+5
-52
lines changed

.github/workflows/publish-python-client.yml

Lines changed: 5 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ permissions: read-all
55

66
jobs:
77

8-
publish-osparc_client:
9-
name: Publish osparc_client wheel
8+
publish:
9+
name: Publish
1010
runs-on: ubuntu-latest
1111
environment:
1212
name: pypi
@@ -32,14 +32,15 @@ jobs:
3232
- name: Check release
3333
id: release
3434
run: |
35+
source .venv/bin/activate
3536
version=$(cat osparc_python_wheels/VERSION)
3637
is_release=$(python scripts/is_semantic_version.py "${version}" --no-raise-result)
3738
echo "is-release=${is_release}" >> $GITHUB_OUTPUT
3839
- name: Remove osparc wheel
3940
run: |
4041
osparc_wheel=$(ls osparc_python_wheels/osparc-*)
41-
rm -f ${osparc_wheel}
42-
rm -f osparc_python_wheels/VERSION
42+
osparc_client_wheel=$(ls osparc_python_wheels/osparc_client*)
43+
rm osparc_python_wheels/VERSION
4344
- name: Publish osparc_client to Test PyPI
4445
uses: pypa/gh-action-pypi-publish@release/v1
4546
with:
@@ -52,51 +53,3 @@ jobs:
5253
with:
5354
verbose: true
5455
packages-dir: osparc_python_wheels/
55-
56-
publish-osparc:
57-
name: Publish osparc wheel
58-
runs-on: ubuntu-latest
59-
environment:
60-
name: pypi
61-
url: https://pypi.org/p/osparc
62-
permissions:
63-
id-token: write
64-
steps:
65-
- uses: actions/checkout@v3
66-
with:
67-
ref: ${{ github.ref }}
68-
- name: Set up Python
69-
uses: actions/setup-python@v2
70-
with:
71-
python-version: 3.9
72-
- name: Set up Python environment
73-
run: |
74-
make devenv
75-
- name: Download wheels
76-
uses: actions/download-artifact@v3
77-
with:
78-
name: osparc_python_wheels
79-
path: osparc_python_wheels/
80-
- name: Check release
81-
id: release
82-
run: |
83-
version=$(cat osparc_python_wheels/VERSION)
84-
is_release=$(python scripts/is_semantic_version.py "${version}" --no-raise-result)
85-
echo "is-release=${is_release}" >> $GITHUB_OUTPUT
86-
- name: Remove osparc_client wheel
87-
run: |
88-
osparc_client_wheel=$(ls osparc_python_wheels/osparc_client*)
89-
rm -f ${osparc_client_wheel}
90-
rm -f osparc_python_wheels/VERSION
91-
- name: Publish osparc to Test PyPI
92-
uses: pypa/gh-action-pypi-publish@release/v1
93-
with:
94-
repository-url: https://test.pypi.org/legacy/
95-
verbose: true
96-
packages-dir: osparc_python_wheels/
97-
- name: Publish osparc to PyPI
98-
if: steps.release.outputs.is-release == 'True'
99-
uses: pypa/gh-action-pypi-publish@release/v1
100-
with:
101-
verbose: true
102-
packages-dir: osparc_python_wheels/

0 commit comments

Comments
 (0)