diff --git a/.github/workflows/mirror-assets.yml b/.github/workflows/mirror-assets.yml new file mode 100644 index 0000000..448a7a6 --- /dev/null +++ b/.github/workflows/mirror-assets.yml @@ -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 diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..8bf70e3 --- /dev/null +++ b/.github/workflows/pages.yml @@ -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 diff --git a/dist/.gitkeep b/dist/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/Deploy.vue b/src/pages/Deploy.vue new file mode 100644 index 0000000..943325a --- /dev/null +++ b/src/pages/Deploy.vue @@ -0,0 +1,444 @@ +// src/pages/Deploy.vue (refactor: fetch ABI/WASM from CORS-friendly mirrors with fallback) + + +