File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ jobs:
275275 needs : [job_get_metadata, job_build]
276276 timeout-minutes : 15
277277 runs-on : ubuntu-20.04
278- if : github.event_name == 'pull_request' || needs.job_get_metadata.outputs.is_develop == 'true'
278+ if : github.event_name == 'pull_request' || needs.job_get_metadata.outputs.is_develop == 'true' || needs.job_get_metadata.outputs.is_release == 'true'
279279 steps :
280280 - name : Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
281281 uses : actions/checkout@v3
Original file line number Diff line number Diff line change 1+ name : Add size info to release
2+ on :
3+ release :
4+ types :
5+ - published
6+ workflow_dispatch :
7+ inputs :
8+ version :
9+ description : Which version to add size info for
10+ required : false
11+
12+ # This workflow is triggered when a release is published
13+ # It fetches the size-limit info from the release branch and adds it to the release
14+ jobs :
15+ release-size-info :
16+ runs-on : ubuntu-20.04
17+ name : ' Add size-limit info to release'
18+
19+ steps :
20+ # https://github.com/actions-ecosystem/action-regex-match
21+ - uses : actions-ecosystem/action-regex-match@v2
22+ id : head_version
23+ with :
24+ # Parse version from head ref, which is refs/tags/<tag_name>
25+ text : ${{ github.head_ref }}
26+ regex : ' ^refs\/tags\/([\d.]+)$'
27+
28+ - name : Get version
29+ id : get_version
30+ run : echo "version=${{ github.event.inputs.version || steps.head_version.outputs.match }}" >> $GITHUB_OUTPUT
31+
32+ - name : Update Github Release
33+ if : steps.get_version.outputs.version != ''
34+ uses : getsentry/size-limit-release@main
35+ with :
36+ github_token : ${{ secrets.GITHUB_TOKEN }}
37+ version : ${{ steps.get_version.outputs.version }}
38+ workflow_name : ' Build & Test'
You can’t perform that action at this time.
0 commit comments