66 inputs :
77 tag-name :
88 type : string
9- description : " Nightly release tag"
9+ description : " Release tag"
1010 required : true
11+ type :
12+ type : choice
13+ description : " Release type"
14+ required : true
15+ options :
16+ - " nightly"
17+ - " stable"
18+
1119 push :
1220 tags : ["*"]
1321
1422jobs :
15- create-nightly- tag :
16- if : ${{ github.event_name != 'push ' }}
23+ create-tag :
24+ if : ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch ' }}
1725 runs-on : ubuntu-24.04
1826 permissions :
1927 contents : write
@@ -29,31 +37,75 @@ jobs:
2937 run : |
3038 MANUAL_TAG="${{ inputs.tag-name }}"
3139 echo "TAG_NAME=${MANUAL_TAG:-$(date +'%Y-%m-%d')-a}" >> $GITHUB_OUTPUT
40+ - run : rake 'bump_version[${{ steps.generate-tag.outputs.TAG_NAME }}]'
41+ if : ${{ inputs.type == 'stable' }}
42+ - run : git commit -am "Release ${{ steps.generate-tag.outputs.TAG_NAME }}"
43+ if : ${{ inputs.type == 'stable' }}
3244 - run : git tag "${{ steps.generate-tag.outputs.TAG_NAME }}"
3345 - run : git push origin "${{ steps.generate-tag.outputs.TAG_NAME }}"
3446
35- release-nightly :
36- if : ${{ github.event_name != 'push' }}
47+ # For nightly releases, we just build and publish npm packages
48+ release-nightly-npm-packages :
49+ if : ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'nightly') }}
3750 needs :
38- - create-nightly- tag
51+ - create-tag
3952 permissions :
4053 contents : write
4154 id-token : write
4255 packages : write
4356 uses : ./.github/workflows/build.yml
4457 with :
4558 publish : true
46- prerel_name : ${{ needs.create-nightly- tag.outputs.tag-name }}
59+ prerel_name : ${{ needs.create-tag.outputs.tag-name }}
4760 secrets : inherit
4861
49- release-tag :
50- if : ${{ github.event_name == 'push' && github.actor != 'github-actions[bot]' }}
62+ # For stable releases, we build and publish npm packages, ruby_wasm gem, and js gem
63+ release-tag-npm-packages :
64+ if : ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'stable') }}
65+ needs :
66+ - create-tag
5167 permissions :
5268 contents : write
5369 id-token : write
5470 packages : write
5571 uses : ./.github/workflows/build.yml
5672 with :
5773 publish : true
58- prerel_name : ${{ github.ref_name }}
74+ prerel_name : ${{ needs.create-tag.outputs.tag-name || github.ref_name }}
5975 secrets : inherit
76+
77+ release-tag-ruby_wasm-gem :
78+ if : ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'stable') }}
79+ needs :
80+ - create-tag
81+ permissions :
82+ contents : write
83+ id-token : write
84+ packages : write
85+ uses : ./.github/workflows/build-gems.yml
86+ with :
87+ publish : true
88+ ref : ${{ needs.create-tag.outputs.tag-name || github.ref_name }}
89+ secrets : inherit
90+
91+ release-tag-js-gem :
92+ if : ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'stable') }}
93+ runs-on : ubuntu-24.04
94+ needs :
95+ - create-tag
96+ permissions :
97+ contents : write
98+ id-token : write
99+ packages : write
100+ steps :
101+ - uses : actions/checkout@v6
102+ with :
103+ ref : ${{ needs.create-tag.outputs.tag-name || github.ref_name }}
104+ - uses : ruby/setup-ruby@v1
105+ with :
106+ ruby-version : " 3.4"
107+ - uses : rubygems/configure-rubygems-credentials@v1.0.0
108+ - run : |
109+ cd packages/gems/js
110+ gem build
111+ gem push js-*.gem
0 commit comments