Skip to content

Commit 4c2f3bb

Browse files
committed
fix publish job
1 parent 38e4a3e commit 4c2f3bb

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ jobs:
216216
name: release
217217
url: https://pypi.org/project/bioimageio.spec/
218218
permissions:
219+
contents: write # required for tag creation
219220
id-token: write # required for pypi publish action
220221
steps:
221222
- name: Check out the repository
@@ -228,26 +229,19 @@ jobs:
228229
echo "sha=$(git rev-parse --verify --quiet HEAD^)" >> $GITHUB_OUTPUT
229230
230231
- name: Detect new version
231-
id: check-version
232+
id: tag-version
232233
if: github.ref == 'refs/heads/main' && steps.check-parent-commit.outputs.sha
233234
uses: salsify/[email protected]
234235
with:
235-
create-tag: false
236+
create-tag: true
236237
version-command: |
237238
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 }}
245239
- uses: actions/download-artifact@v4
246-
if: github.ref == 'refs/heads/main' && steps.tag-version.outputs.new_tag
240+
if: github.ref == 'refs/heads/main' && steps.tag-version.outputs.tag
247241
with:
248242
name: dist
249243
- name: Publish package on PyPI
250-
if: github.ref == 'refs/heads/main' && steps.tag-version.outputs.new_tag
244+
if: github.ref == 'refs/heads/main' && steps.tag-version.outputs.tag
251245
uses: pypa/gh-action-pypi-publish@release/v1
252246
with:
253247
packages-dir: dist/
@@ -256,7 +250,7 @@ jobs:
256250
if: github.ref == 'refs/heads/main'
257251
uses: release-drafter/[email protected]
258252
with:
259-
publish: "${{ steps.tag-version.outputs.new_tag != '' }}"
260-
tag: '${{ steps.tag-version.outputs.new_tag }}'
253+
publish: "${{ steps.tag-version.outputs.tag != '' }}"
254+
tag: '${{ steps.tag-version.outputs.tag }}'
261255
env:
262256
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)