Skip to content

Commit a622065

Browse files
committed
fix publish job
1 parent 38e4a3e commit a622065

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ jobs:
148148
folder: dist
149149

150150
build:
151-
needs: test
152151
runs-on: ubuntu-latest
153152
steps:
154153
- uses: actions/checkout@v4
@@ -161,7 +160,6 @@ jobs:
161160
python -m pip install --upgrade pip
162161
pip --version
163162
pip install --upgrade build
164-
pip install .
165163
- name: Build package
166164
run: |
167165
python -m build
@@ -171,7 +169,6 @@ jobs:
171169
name: dist
172170

173171
conda-build:
174-
needs: test
175172
runs-on: ubuntu-latest
176173
steps:
177174
- uses: actions/checkout@v4
@@ -210,12 +207,13 @@ jobs:
210207
# recipe-path: conda-recipe/recipe.yaml
211208

212209
publish:
213-
needs: [build, conda-build]
210+
needs: [test, coverage, build, conda-build]
214211
runs-on: ubuntu-latest
215212
environment:
216213
name: release
217214
url: https://pypi.org/project/bioimageio.spec/
218215
permissions:
216+
contents: write # required for tag creation
219217
id-token: write # required for pypi publish action
220218
steps:
221219
- name: Check out the repository
@@ -228,26 +226,20 @@ jobs:
228226
echo "sha=$(git rev-parse --verify --quiet HEAD^)" >> $GITHUB_OUTPUT
229227
230228
- name: Detect new version
231-
id: check-version
229+
id: tag-version
232230
if: github.ref == 'refs/heads/main' && steps.check-parent-commit.outputs.sha
233231
uses: salsify/[email protected]
234232
with:
235-
create-tag: false
233+
create-tag: true
236234
version-command: |
237235
python -c "from pathlib import Path;print(p_version.read_text().split('VERSION = \"')[1].split('\"')[0] if (p_version:=Path('src/bioimageio/spec/_version.py')).exists() else Path('src/bioimageio/spec/__init__.py').read_text().split('__version__ = \"')[1].split('\"')[0])"
238-
- name: Push tag
239-
id: tag-version
240-
if: github.ref == 'refs/heads/main' && steps.check-version.outputs.previous-version != steps.check-version.outputs.current-version
241-
uses: mathieudutour/[email protected]
242-
with:
243-
github_token: ${{ secrets.GITHUB_TOKEN }}
244-
custom_tag: ${{ steps.check-version.outputs.current-version }}
245236
- uses: actions/download-artifact@v4
246-
if: github.ref == 'refs/heads/main' && steps.tag-version.outputs.new_tag
237+
if: github.ref == 'refs/heads/main' && steps.tag-version.outputs.tag
247238
with:
248239
name: dist
240+
path: dist
249241
- name: Publish package on PyPI
250-
if: github.ref == 'refs/heads/main' && steps.tag-version.outputs.new_tag
242+
if: github.ref == 'refs/heads/main' && steps.tag-version.outputs.tag
251243
uses: pypa/gh-action-pypi-publish@release/v1
252244
with:
253245
packages-dir: dist/
@@ -256,7 +248,7 @@ jobs:
256248
if: github.ref == 'refs/heads/main'
257249
uses: release-drafter/[email protected]
258250
with:
259-
publish: "${{ steps.tag-version.outputs.new_tag != '' }}"
260-
tag: '${{ steps.tag-version.outputs.new_tag }}'
251+
publish: "${{ steps.tag-version.outputs.tag != '' }}"
252+
tag: '${{ steps.tag-version.outputs.tag }}'
261253
env:
262254
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

src/bioimageio/spec/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "0.5.5.7"
1+
VERSION = "0.5.6.0"

0 commit comments

Comments
 (0)