@@ -2,9 +2,13 @@ name: Build Cross-build environment for pyodide-build
2
2
3
3
on :
4
4
pull_request :
5
+ push :
6
+ branches :
7
+ - main
5
8
workflow_dispatch :
6
- release :
7
- types : [published]
9
+ schedule :
10
+ # Run at 00:00 UTC on the 1st, 10th, and 20th of every month
11
+ - cron : ' 0 0 1,10,20 * *'
8
12
9
13
concurrency :
10
14
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
96
100
needs : [build]
97
101
if : >-
98
102
github.repository == 'pyodide/pyodide-build-environment-nightly' &&
99
- github.event_name == 'release ' &&
100
- github.event.action == 'published'
103
+ ( github.event_name == 'push ' && startsWith(github.ref, 'refs/tags')) ||
104
+ ( github.event_name == 'schedule')
101
105
permissions :
102
106
# Required to sign the attestations
103
107
id-token : write
@@ -116,6 +120,18 @@ jobs:
116
120
with :
117
121
subject-path : |
118
122
dist/xbuildenv.tar.bz
123
+
124
+ - name : Calc release version
125
+ id : release_version
126
+ shell : bash
127
+ run : |
128
+ if [[ ${{ github.event_name }} == 'schedule' ]]; then
129
+ echo "release_version=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
130
+ else
131
+ echo "release_version=${{ github.ref }}" >> $GITHUB_OUTPUT
132
+ fi
133
+
134
+ cat $GITHUB_OUTPUT
119
135
120
136
- name : Verify them, to ensure that the wheels they were attested correctly
121
137
env :
@@ -126,12 +142,8 @@ jobs:
126
142
127
143
- name : Create GitHub release with these wheels
128
144
uses : softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
129
- if : >-
130
- github.repository == 'pyodide/pyodide-build-environment-nightly' &&
131
- github.event_name == 'release' &&
132
- github.event.action == 'published'
133
145
with :
134
146
files : |
135
147
dist/*.tar.bz
136
148
fail_on_unmatched_files : true
137
- name : Pyodide cross-build environment
149
+ name : ${{ steps.release_version.outputs.release_version }}
0 commit comments