File tree Expand file tree Collapse file tree 2 files changed +47
-1
lines changed Expand file tree Collapse file tree 2 files changed +47
-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+
21+ # https://github.com/actions-ecosystem/action-regex-match
22+ - uses : actions-ecosystem/action-regex-match@v2
23+ id : head_version
24+ with :
25+ # Parse version from head ref, which is refs/tags/<tag_name>
26+ text : ${{ github.head_ref }}
27+ regex : ' ^refs\/tags\/([\d.]+)$'
28+
29+ - name : Get version
30+ id : get_version
31+ run : echo "version=${{ github.event.inputs.version || steps.head_version.outputs.match }}" >> $GITHUB_OUTPUT
32+
33+ - name : Fetch release
34+ id : fetch_release
35+ uses : cardinalby/git-get-release-action@v1
36+ with :
37+ tag : ${{ steps.get_version.outputs.version }}
38+
39+ - name : Update Github Release
40+ uses : getsentry/size-limit-release@main
41+ with :
42+ github_token : ${{ secrets.GITHUB_TOKEN }}
43+ version : ${{ steps.get_version.outputs.version }}
44+ # WIP:
45+ branch_name : develop
46+ workflow_name : ' build.yml'
You can’t perform that action at this time.
0 commit comments