Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/mirror-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Mirror Release Assets to Repo

on:
release:
types: [published]
workflow_dispatch: {}

on:
release:
types: [published]

jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download release assets
uses: robinraju/release-downloader@v1.10
with:
repository: ${{ github.repository }}
tag: ${{ github.event.release.tag_name }}
fileName: "token.*"
out-file-path: "mirror_tmp"
useLatestRelease: false

- name: Prepare dist folder
run: |
V="${{ github.event.release.tag_name }}"
mkdir -p dist/token.wind/${V} dist/token.wind/latest
cp mirror_tmp/token.abi dist/token.wind/${V}/token.abi
cp mirror_tmp/token.wasm dist/token.wind/${V}/token.wasm
cp mirror_tmp/token.abi dist/token.wind/latest/token.abi
cp mirror_tmp/token.wasm dist/token.wind/latest/token.wasm
(cd dist/token.wind/${V} && sha256sum token.* | tee SHA256SUMS.txt)

- name: Commit & push
run: |
V="${{ github.event.release.tag_name }}"
git config user.name "windvex-bot"
git config user.email "bot@windvex"
git add dist/
git commit -m "chore(dist): mirror assets for ${V}"
git push
29 changes: 29 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to GitHub Pages
on:
push:
branches: [main]
paths:
- 'dist/**'

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/upload-pages-artifact@v3
with:
path: 'dist'
- id: deployment
uses: actions/deploy-pages@v4
Empty file added dist/.gitkeep
Empty file.
Loading