Skip to content

example pages generated #9

example pages generated

example pages generated #9

Workflow file for this run

name: Publish
on:
push:
tags: ["*"]
env:
CARGO_TERM_COLOR: always
jobs:
publish-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Login
run: cargo login ${{ secrets.CARGO_API_TOKEN }}
- name: Publish
run: cargo publish
publish-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: wasm-pack-action
uses: jetli/[email protected]
- run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}
- name: Builds
run: wasm-pack build --features wasm
- name: Publish
run: wasm-pack publish
- name: Set VERSION
run: echo "VERSION=$(echo ${{github.ref_name}} | sed -e 's/[A-Za-z]*//')" >> $GITHUB_ENV
- run: gh release create ${{ github.ref_name }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: gh release upload ${{ github.ref_name }} "./pkg/fi_verifiable_data.js" "./pkg/fi_verifiable_data_bg.wasm" "./pkg/fi_verifiable_data_bg.wasm.d.ts" "./pkg/fi_verifiable_data.d.ts"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-cdn:
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- uses: actions/checkout@v4
- name: wasm-pack-action
uses: jetli/[email protected]
- name: build
run: wasm-pack build --features wasm --target web
- name: commit
run: mkdir _site
cp index.html ./_site
cp -r examples ./_site
cp -r pkg ./_site
git checkout -B pages
rm -r pkg
rm -r examples
rm index.html
mv -v _site/* ./
git add .
git commit -m "Republish github pages"
git push origin pages