Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit 3d76d36

Browse files
authored
fix: BSB version dependencies (#25)
* fix: bump bsb-core and bsb-hdf5 version and fix GHA for PR * fix: add GHA test in case of no version bump
1 parent 2c09d94 commit 3d76d36

File tree

4 files changed

+34
-14
lines changed

4 files changed

+34
-14
lines changed

.github/workflows/main.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
build:
1414
uses: ./.github/workflows/build.yml
1515

16-
tag_release:
16+
bump:
1717
needs: [isort, black, build]
1818
runs-on: ubuntu-latest
1919
outputs:
@@ -40,6 +40,26 @@ jobs:
4040
with:
4141
token: ${{ steps.app-token.outputs.token }}
4242
branch: main
43+
noVersionBumpBehavior: warn
44+
45+
tag_release:
46+
needs: [ bump ]
47+
# Skip job in case no version bump is required
48+
# in this case the variable tag will not be set by semver
49+
if: ${{ needs.bump.outputs.tag != ''}}
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Create Github token
53+
uses: actions/create-github-app-token@v1
54+
id: app-token
55+
with:
56+
app-id: ${{ vars.DBBS_APP_ID }}
57+
private-key: ${{ secrets.DBBS_APP_PRIVATE_KEY }}
58+
- name: Checkout Code
59+
uses: actions/checkout@v4
60+
with:
61+
fetch-depth: 0
62+
token: ${{ steps.app-token.outputs.token }}
4363

4464
- name: Set up Python 3.11
4565
uses: actions/setup-python@v5
@@ -49,26 +69,26 @@ jobs:
4969
- name: Bump version in Python project
5070
run: |
5171
pip install --upgrade pip bump-my-version
52-
oldv="${{ steps.semver.outputs.current }}"
53-
newv="${{steps.semver.outputs.next}}"
72+
oldv="${{ needs.bump.outputs.old_tag }}"
73+
newv="${{needs.bump.outputs.tag}}"
5474
# Bump the version, dropping the leading `v` with `${x:1}`
5575
bump-my-version replace --current-version=${oldv:1} --new-version=${newv:1} pyproject.toml
5676
5777
- name: Commit & Push version change
5878
uses: stefanzweifel/git-auto-commit-action@v5
5979
with:
6080
branch: main
61-
commit_message: 'docs: bump version: ${{ steps.semver.outputs.current }} → ${{ steps.semver.outputs.next }} [skip ci]'
81+
commit_message: 'docs: bump version: ${{ needs.bump.outputs.old_tag }} → ${{ needs.bump.outputs.tag }} [skip ci]'
6282

6383
- name: Create tag
6484
uses: rickstaa/action-create-tag@v1
6585
with:
66-
tag: ${{ steps.semver.outputs.next }}
86+
tag: ${{ needs.bump.outputs.tag }}
6787
github_token: ${{ steps.app-token.outputs.token }}
6888

6989
release:
7090
runs-on: ubuntu-latest
71-
needs: tag_release
91+
needs: [bump, tag_release]
7292

7393
steps:
7494
- name: Create Github token
@@ -93,17 +113,17 @@ jobs:
93113
uses: requarks/changelog-action@v1
94114
with:
95115
token: ${{ steps.app-token.outputs.token }}
96-
fromTag: ${{ needs.tag_release.outputs.tag }}
97-
toTag: ${{ needs.tag_release.outputs.old_tag }}
116+
fromTag: ${{ needs.bump.outputs.tag }}
117+
toTag: ${{ needs.bump.outputs.old_tag }}
98118

99119
- name: Create Release
100120
uses: ncipollo/release-action@v1.12.0
101121
with:
102122
allowUpdates: true
103123
draft: false
104124
makeLatest: true
105-
tag: ${{ needs.tag_release.outputs.tag }}
106-
name: ${{ needs.tag_release.outputs.tag }}
125+
tag: ${{ needs.bump.outputs.tag }}
126+
name: ${{ needs.bump.outputs.tag }}
107127
body: ${{ steps.changelog.outputs.changes }}
108128
token: ${{ steps.app-token.outputs.token }}
109129

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: PR Conventional Commit Validation
14-
uses: ytanikin/PRConventionalCommits@1.2.0
14+
uses: ytanikin/PRConventionalCommits@1.3.0
1515
with:
1616
task_types: '["feat","fix","docs","test","ci","refactor","perf","revert"]'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# bsb-neuron
55

6-
bsb-neuron is a pluggin of [BSB](https://github.com/dbbs-lab/bsb) (see also
6+
bsb-neuron is a plugin of the [BSB](https://github.com/dbbs-lab/bsb) (see also
77
[bsb-core](https://github.com/dbbs-lab/bsb-core)).
88
It contains the interfaces and tools to simulate BSB circuit with the
99
[neuron simulator](https://www.neuron.yale.edu/neuron/).

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license = { file = "LICENSE" }
1010
classifiers = ["License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)"]
1111
dynamic = ["version", "description"]
1212
dependencies = [
13-
"bsb-core~=4.0",
13+
"bsb-core~=5.0",
1414
"nrn-patch~=4.0",
1515
"arborize[neuron]~=4.1"
1616
]
@@ -27,7 +27,7 @@ test = [
2727
"bsb-core[parallel]",
2828
"bsb-test~=4.0",
2929
"coverage~=7.0",
30-
"bsb-hdf5~=4.0"
30+
"bsb-hdf5~=5.0"
3131
]
3232
dev = [
3333
"bsb-neuron[test]",

0 commit comments

Comments
 (0)