1
1
name : Release Cross-build environment
2
2
3
3
on :
4
- push :
5
- tags :
6
- - ' *'
4
+ schedule :
5
+ # Run at 00:00 UTC on the 1st, 10th, and 20th of every month
6
+ - cron : ' 0 0 1,10,20 * *'
7
+ workflow_dispatch :
8
+ inputs :
9
+ release_version :
10
+ description : ' The version to release'
11
+ required : true
7
12
8
13
concurrency :
9
14
group : release-${{ github.workflow }}-${{ github.ref }}
17
22
runs-on : ubuntu-latest
18
23
needs : [build]
19
24
if : >-
20
- github.repository == 'pyodide/pyodide-build-environment-nightly' &&
21
- (github.event_name == 'push' && startsWith(github.ref, 'refs/tags'))
25
+ github.repository == 'pyodide/pyodide-build-environment-nightly'
22
26
permissions :
23
27
# Required to sign the attestations
24
28
id-token : write
42
46
id : release_version
43
47
shell : bash
44
48
run : |
45
- echo "release_version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
49
+ if [[ ${{ github.event_name }} == 'schedule' ]]; then
50
+ echo "release_version=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
51
+ else
52
+ echo "release_version=${{ github.event.inputs.release_version }}" >> $GITHUB_OUTPUT
53
+ fi
46
54
47
55
cat $GITHUB_OUTPUT
48
56
@@ -52,11 +60,22 @@ jobs:
52
60
shell : bash
53
61
run : |
54
62
gh attestation verify dist/xbuildenv.tar.bz2 --repo ${{ github.repository }}
63
+
64
+ - name : Create and push tag
65
+ run : |
66
+ git config --global user.name "Pyodide CI"
67
+ git config --global user.email "[email protected] "
68
+ TAG_NAME=${{ steps.release_version.outputs.release_version }}
69
+ git tag $TAG_NAME
70
+ git push origin $TAG_NAME
71
+ env :
72
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55
73
56
74
- name : Create GitHub release with these wheels
57
75
uses : softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
58
76
with :
59
77
files : |
60
78
dist/*.tar.bz2
79
+ tag_name : ${{ steps.release_version.outputs.release_version }}
61
80
fail_on_unmatched_files : true
62
81
name : ${{ steps.release_version.outputs.release_version }}
0 commit comments