Skip to content

CI (squash this PR)

CI (squash this PR) #7

Workflow file for this run

name: Release
on:
push:
tags:
- "x*"
jobs:
# build-and-test:
# uses: "./.github/workflows/build-and-test.yml"
release:
runs-on: ubuntu-latest
steps:
- name: Setup Wasmer
uses: wasmerio/setup-wasmer@v3.1
- name: Check out
uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
path: build-artifacts
- name: Publish
run: |
TAG_NAME=${{github.ref_name}}
VERSION_NUMBER=${TAG_NAME#x}
echo Publishing version $VERSION_NUMBER
if ! grep -q "version = ['\"]$VERSION_NUMBER['\"]" wasmer.toml; then
echo Tagged version must match version in wasmer.toml
exit -1
fi
if ! grep -q "version = ['\"]$VERSION_NUMBER['\"]" Cargo.toml; then
echo Tagged version must match version in Cargo.toml
exit -1
fi
mkdir -p target/wasm32-wasmer-wasi/release
mv build-artifacts/winterjs-wasm/winterjs.wasm target/wasm32-wasmer-wasi/release/winterjs.wasm
wasmer publish --registry="wasmer.wtf" --token=${{ secrets.WAPM_DEV_TOKEN }} --non-interactive
echo so far, so good