Skip to content

Commit 132b7ae

Browse files
🐛 (#118)
* 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
1 parent 352bbb6 commit 132b7ae

File tree

2 files changed

+14
-20
lines changed

2 files changed

+14
-20
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,3 @@ jobs:
133133
if: github.event_name == 'push' && ( startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master' )
134134
needs: [test-20-04, test-latest]
135135
uses: ./.github/workflows/publish-python-client.yml
136-
with:
137-
run_id: ${{github.run_id}}

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

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: publish-python-client
22
on:
33
workflow_call:
4-
inputs:
5-
run_id:
6-
required: true
7-
type: string
84
permissions: read-all
95

106
jobs:
@@ -29,16 +25,16 @@ jobs:
2925
run: |
3026
make devenv
3127
- name: Download wheels
32-
id: download
28+
uses: actions/download-artifact@v3
29+
with:
30+
name: osparc_python_wheels
31+
path: osparc_python_wheels/
32+
- name: Check release
33+
id: release
3334
run: |
34-
source .venv/bin/activate
35-
repo=${{github.repository}}
36-
gh run download ${{ inputs.run_id }} --repo=${repo}
3735
version=$(cat osparc_python_wheels/VERSION)
3836
is_release=$(python scripts/is_semantic_version.py "${version}" --no-raise-result)
3937
echo "is-release=${is_release}" >> $GITHUB_OUTPUT
40-
env:
41-
GH_TOKEN: ${{ github.token }}
4238
- name: Remove osparc wheel
4339
run: |
4440
osparc_wheel=$(ls osparc_python_wheels/osparc-*)
@@ -51,7 +47,7 @@ jobs:
5147
verbose: true
5248
packages-dir: osparc_python_wheels/
5349
- name: Publish osparc_client to PyPI
54-
if: steps.download.outputs.is-release == 'True'
50+
if: steps.release.outputs.is-release == 'True'
5551
uses: pypa/gh-action-pypi-publish@release/v1
5652
with:
5753
verbose: true
@@ -77,16 +73,16 @@ jobs:
7773
run: |
7874
make devenv
7975
- name: Download wheels
80-
id: download
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
8182
run: |
82-
source .venv/bin/activate
83-
repo=${{github.repository}}
84-
gh run download ${{ inputs.run_id }} --repo=${repo}
8583
version=$(cat osparc_python_wheels/VERSION)
8684
is_release=$(python scripts/is_semantic_version.py "${version}" --no-raise-result)
8785
echo "is-release=${is_release}" >> $GITHUB_OUTPUT
88-
env:
89-
GH_TOKEN: ${{ github.token }}
9086
- name: Remove osparc_client wheel
9187
run: |
9288
osparc_client_wheel=$(ls osparc_python_wheels/osparc_client*)
@@ -99,7 +95,7 @@ jobs:
9995
verbose: true
10096
packages-dir: osparc_python_wheels/
10197
- name: Publish osparc to PyPI
102-
if: steps.download.outputs.is-release == 'True'
98+
if: steps.release.outputs.is-release == 'True'
10399
uses: pypa/gh-action-pypi-publish@release/v1
104100
with:
105101
verbose: true

0 commit comments

Comments
 (0)