Skip to content

Commit 1adeee5

Browse files
authored
Update BuildArtifacts.yml
1 parent cb88e18 commit 1adeee5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/BuildArtifacts.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow builds artifacts for multiple Julia versions concurrently
22
# and then creates a single pull request with the updated TOML files.
3-
# Additionally, on a Project.toml version change, it aggregates all built
3+
# Additionally it aggregates all built
44
# tarballs and uploads a single versioned artifact:
55
# model-archives-<package-version>
66

@@ -10,6 +10,8 @@ on:
1010
push:
1111
branches:
1212
- main
13+
paths:
14+
- Project.toml
1315
workflow_dispatch:
1416

1517
concurrency:
@@ -63,8 +65,10 @@ jobs:
6365
6466
# This job runs in parallel for each Julia version specified in the matrix.
6567
build:
66-
if: "!contains(github.event.head_commit.message, 'update-toml-files')"
6768
needs: version_check
69+
if: >
70+
(github.event_name == 'workflow_dispatch' || needs.version_check.outputs.changed == 'true')
71+
&& !contains(github.event.head_commit.message || '', 'update-toml-files')
6872
runs-on: ubuntu-latest
6973
strategy:
7074
fail-fast: true
@@ -111,11 +115,11 @@ jobs:
111115
path: .
112116
retention-days: 1
113117

114-
# Aggregate all tarballs into a single versioned artifact only on version bump.
118+
# Aggregate all tarballs into a single versioned artifact.
115119
collect_archives:
116120
runs-on: ubuntu-latest
117121
needs: [version_check, build]
118-
if: needs.version_check.outputs.changed == 'true'
122+
if: github.event_name == 'workflow_dispatch' || needs.version_check.outputs.changed == 'true'
119123
steps:
120124
- name: Download all tarball artifacts
121125
uses: actions/download-artifact@v4
@@ -140,6 +144,7 @@ jobs:
140144
create_pr:
141145
runs-on: ubuntu-latest
142146
needs: build
147+
if: github.event_name == 'workflow_dispatch' || needs.version_check.outputs.changed == 'true'
143148

144149
steps:
145150
- name: Checkout a clean version of the code

0 commit comments

Comments
 (0)