File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : CI
22
33on :
4- - push
5- - pull_request
4+ push :
5+ branches :
6+ - main
7+ - ' build/**'
8+ pull_request :
69
710concurrency :
811 group : ${{ github.workflow }}-${{ github.ref }}
3942 - name : Run tests
4043 run : cargo test --all --release
4144
42- all-checks-passed :
43- name : All checks passed
44- needs : [check, test]
45- runs-on : ubuntu-24.04
46- steps :
47- - run : " :"
48-
4945 build :
5046 name : Build artifacts [${{ matrix.platform.name }}]
51- if : github.event_name == 'push'
5247 strategy :
5348 matrix :
5449 platform :
@@ -145,10 +140,18 @@ jobs:
145140 if-no-files-found : error
146141 path : artifacts/brioche
147142
143+ all-checks-passed :
144+ name : All checks passed
145+ needs : [check, test, build]
146+ runs-on : ubuntu-24.04
147+ steps :
148+ - run : " :"
149+
148150 push :
149151 name : Push artifacts
150- if : github.event_name == 'push' && github.repository == 'brioche-dev/brioche-runtime-utils'
151- needs : [all-checks-passed, build]
152+ # Only push artifacts when pushing to `main` and `build/*` branches
153+ if : github.event_name == 'push' && github.repository == 'brioche-dev/brioche-runtime-utils' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/'))
154+ needs : [all-checks-passed]
152155 runs-on : ubuntu-24.04
153156 steps :
154157 - name : Download artifacts (x86_64-linux)
You can’t perform that action at this time.
0 commit comments