Skip to content

Commit 202fc30

Browse files
authored
Merge pull request #1 from windvex/chore/mirror-assets-and-pages
Mirror Release assets + Pages + Deploy.vue CORS fallback
2 parents c3df138 + 63b5a5b commit 202fc30

File tree

4 files changed

+519
-0
lines changed

4 files changed

+519
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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

.github/workflows/pages.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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

dist/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)