1111# This seperates the release process from the test process, so we can still release if we need to and tests are failing
1212name : Bump Version
1313on :
14+ push :
15+ branches :
16+ - main
17+ pull_request :
1418 workflow_dispatch :
1519 inputs :
1620 type :
2731 bump :
2832 runs-on : ubuntu-latest
2933 permissions : write-all
34+ if : github.event_name == 'workflow_dispatch'
3035 outputs :
3136 version : ${{ steps.bump.outputs.version }}
3237 steps :
@@ -52,10 +57,14 @@ jobs:
5257 matrix :
5358 target : [aarch64, ppc64]
5459 needs : [bump]
60+ if : ${{ always() }}
5561 steps :
5662 - uses : actions/checkout@v4
63+ if : ${{ needs.bump.result == 'success' }}
5764 with :
5865 ref : version-${{ needs.bump.outputs.version }}
66+ - uses : actions/checkout@v4
67+ if : ${{ needs.bump.result == 'skipped' }}
5968 - uses : PyO3/maturin-action@v1.47.0
6069 with :
6170 target : ${{ matrix.target }}
@@ -72,10 +81,14 @@ jobs:
7281 name : build linux
7382 runs-on : ubuntu-latest
7483 needs : [bump]
84+ if : ${{ always() }}
7585 steps :
7686 - uses : actions/checkout@v4
87+ if : ${{ needs.bump.result == 'success' }}
7788 with :
7889 ref : version-${{ needs.bump.outputs.version }}
90+ - uses : actions/checkout@v4
91+ if : ${{ needs.bump.result == 'skipped' }}
7992 - name : Setup QEMU
8093 uses : docker/setup-qemu-action@v3
8194 - uses : PyO3/maturin-action@v1.47.0
@@ -93,10 +106,14 @@ jobs:
93106 name : build windows
94107 runs-on : windows-latest
95108 needs : [bump]
109+ if : ${{ always() }}
96110 steps :
97111 - uses : actions/checkout@v4
112+ if : ${{ needs.bump.result == 'success' }}
98113 with :
99114 ref : version-${{ needs.bump.outputs.version }}
115+ - uses : actions/checkout@v4
116+ if : ${{ needs.bump.result == 'skipped' }}
100117 - uses : PyO3/maturin-action@v1.47.0
101118 with :
102119 command : build
@@ -111,10 +128,14 @@ jobs:
111128 name : build macos
112129 runs-on : macos-latest
113130 needs : [bump]
131+ if : ${{ always() }}
114132 steps :
115133 - uses : actions/checkout@v4
134+ if : ${{ needs.bump.result == 'success' }}
116135 with :
117136 ref : version-${{ needs.bump.outputs.version }}
137+ - uses : actions/checkout@v4
138+ if : ${{ needs.bump.result == 'skipped' }}
118139 - uses : PyO3/maturin-action@v1.47.0
119140 with :
120141 command : build
@@ -130,7 +151,7 @@ jobs:
130151 name : Release
131152 runs-on : ubuntu-latest
132153 if : startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch')
133- needs : [macos, windows, linux, linux-cross]
154+ needs : [macos, windows, linux, linux-cross, bump ]
134155 steps :
135156 - uses : actions/download-artifact@v4
136157 with :
0 commit comments