Skip to content

[*] refactor

[*] refactor #23

Workflow file for this run

name: web
on: [push]
permissions:
contents: write
jobs:
action-run:
runs-on: ubuntu-latest
steps:
- run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "πŸ’‘ The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "The ${{ github.workspace }} is now ready to test your code on the runner."
- run: ls ${{ github.workspace }}
- run: sudo apt update
- run: echo "start install Rust..."
- name: Install Rust
uses: actions-rs/toolchain@v1
- run: echo "end install Rust..."
- run: echo "start install wasm-pack..."
- run: cargo install wasm-pack
- run: echo "start install wasm-pack..."
- run: echo "start build..."
- run: make web-build-dist
- run: echo "end build..."
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- run: echo "start packing..."
- run: make app-name
- name: Export package
shell: bash
if: startsWith(github.ref, 'refs/tags/')
run: |
binary_name=`cat target/app-name`
output="$binary_name-${{ env.VERSION }}-web.tar.gz"
cp -rf web/dist dist
tar -zcf $output dist
echo "ASSET=$output" >> $GITHUB_ENV
- run: echo "end packing..."
- name: Upload the package
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.ASSET }}
- run: echo "🍏 This job's status is ${{ job.status }}."