File tree Expand file tree Collapse file tree 4 files changed +519
-0
lines changed
Expand file tree Collapse file tree 4 files changed +519
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Mirror Release Assets to Repo
2+
3+ on :
4+ release :
5+ types : [published]
6+ workflow_dispatch : {}
7+
8+ on :
9+ release :
10+ types : [published]
11+
12+ jobs :
13+ mirror :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Download release assets
21+ uses : robinraju/release-downloader@v1.10
22+ with :
23+ repository : ${{ github.repository }}
24+ tag : ${{ github.event.release.tag_name }}
25+ fileName : " token.*"
26+ out-file-path : " mirror_tmp"
27+ useLatestRelease : false
28+
29+ - name : Prepare dist folder
30+ run : |
31+ V="${{ github.event.release.tag_name }}"
32+ mkdir -p dist/token.wind/${V} dist/token.wind/latest
33+ cp mirror_tmp/token.abi dist/token.wind/${V}/token.abi
34+ cp mirror_tmp/token.wasm dist/token.wind/${V}/token.wasm
35+ cp mirror_tmp/token.abi dist/token.wind/latest/token.abi
36+ cp mirror_tmp/token.wasm dist/token.wind/latest/token.wasm
37+ (cd dist/token.wind/${V} && sha256sum token.* | tee SHA256SUMS.txt)
38+
39+ - name : Commit & push
40+ run : |
41+ V="${{ github.event.release.tag_name }}"
42+ git config user.name "windvex-bot"
43+ git config user.email "bot@windvex"
44+ git add dist/
45+ git commit -m "chore(dist): mirror assets for ${V}"
46+ git push
Original file line number Diff line number Diff line change 1+ name : Publish to GitHub Pages
2+ on :
3+ push :
4+ branches : [main]
5+ paths :
6+ - ' dist/**'
7+
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ concurrency :
14+ group : " pages"
15+ cancel-in-progress : false
16+
17+ jobs :
18+ deploy :
19+ environment :
20+ name : github-pages
21+ url : ${{ steps.deployment.outputs.page_url }}
22+ runs-on : ubuntu-latest
23+ steps :
24+ - uses : actions/checkout@v4
25+ - uses : actions/upload-pages-artifact@v3
26+ with :
27+ path : ' dist'
28+ - id : deployment
29+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments