File tree Expand file tree Collapse file tree 2 files changed +34
-9
lines changed
Expand file tree Collapse file tree 2 files changed +34
-9
lines changed Original file line number Diff line number Diff line change @@ -35,18 +35,25 @@ jobs:
3535 cache : npm
3636
3737 - name : Configure GitHub Pages
38- uses : actions/configure-pages@v5
38+ uses : actions/configure-pages@v6
3939
4040 - name : Install dependencies
4141 run : npm ci
4242
4343 - name : Build site
4444 run : npm run build:site
4545
46+ - name : Package Pages artifact
47+ run : |
48+ tar --directory dist -cvf github-pages.tar .
49+ gzip -f github-pages.tar
50+
4651 - name : Upload Pages artifact
47- uses : actions/upload-pages- artifact@v4
52+ uses : actions/upload-artifact@v7
4853 with :
49- path : ./dist
54+ name : github-pages
55+ path : ./github-pages.tar.gz
56+ retention-days : 1
5057
5158 deploy :
5259 if : github.event_name != 'pull_request'
5865 steps :
5966 - name : Deploy to GitHub Pages
6067 id : deployment
61- uses : actions/deploy-pages@v4
68+ uses : actions/deploy-pages@v5
Original file line number Diff line number Diff line change 44 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
55
66on :
7- push :
8- branches :
9- - main
7+ workflow_run :
8+ workflows :
9+ - SDK CI
10+ types :
11+ - completed
1012 workflow_dispatch :
1113
1214permissions :
1315 contents : write
1416
1517concurrency :
16- group : release-${{ github.ref }}
18+ group : release-${{ github.event_name == 'workflow_dispatch' && github. ref || github.event.workflow_run.head_branch }}
1719 cancel-in-progress : true
1820
1921jobs :
2022 release :
23+ if : |
24+ (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') ||
25+ (github.event_name == 'workflow_run' &&
26+ github.event.workflow_run.conclusion == 'success' &&
27+ github.event.workflow_run.event == 'push' &&
28+ github.event.workflow_run.head_branch == 'main')
2129 runs-on : ubuntu-latest
2230 steps :
2331 - name : Check out repository
2432 uses : actions/checkout@v6
2533 with :
2634 fetch-depth : 0
35+ ref : ${{ github.event_name == 'workflow_dispatch' && github.ref || github.event.workflow_run.head_sha }}
36+
37+ - name : Resolve release source
38+ id : source
39+ run : |
40+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
41+ echo "sha=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
42+ else
43+ echo "sha=${{ github.event.workflow_run.head_sha }}" >> "$GITHUB_OUTPUT"
44+ fi
2745
2846 - name : Read release version
2947 id : version
6482 run : |
6583 git config user.name "github-actions[bot]"
6684 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
67- git tag "${{ steps.version.outputs.tag }}" "$GITHUB_SHA "
85+ git tag "${{ steps.version.outputs.tag }}" "${{ steps.source.outputs.sha }} "
6886 git push origin "refs/tags/${{ steps.version.outputs.tag }}"
6987
7088 - name : Create GitHub release
You can’t perform that action at this time.
0 commit comments