Skip to content

0.9.5

0.9.5 #7

Workflow file for this run

name: Publish API Document
on:
release:
types: [released, prereleased]
jobs:
publish:
runs-on: ubuntu-latest
env:
CORE_PACKAGE_DIR: "./packages/mapray"
DOC_DIR: "./doc/typedoc"
DOC_DEPLOY_DIR: "./_deploy/doc/"
EMSDK_DIR: "./_deploy/emsdk"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Setup EMSDK
run: |
mkdir -p ${{ env.EMSDK_DIR }}/../
echo "Cloning EMSDK from github"
git clone --branch=2.0.9 --depth=1 https://github.com/emscripten-core/emsdk.git ${{ env.EMSDK_DIR }}
echo "Coping patch file to the EMSDK directory"
cp ${{ env.CORE_PACKAGE_DIR }}/wasm/emsdk.patch ${{ env.EMSDK_DIR }}/emsdk.patch
echo "Install and Activate EMSDK"
cd ${{ env.EMSDK_DIR }}
./emsdk install latest
./emsdk activate latest
echo "Apply the patch to EMSDK"
git apply -p1 emsdk.patch
- run: git fetch --prune --unshallow
- name: Get deploy version
run: |
NEXT_VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
echo ${NEXT_VERSION}
echo "::set-output name=next_version::${NEXT_VERSION}"
id: get_version
shell: bash
working-directory: ${{ env.CORE_PACKAGE_DIR }}
- name: Build wasm code
run: |
echo "Activate EMSDK"
source ${{ env.EMSDK_DIR }}/emsdk_env.sh
echo "Build wasm code"
cd ${{ env.CORE_PACKAGE_DIR }}
./wasm/rebuild_and_install.sh
shell: bash
- name: Setup
run: yarn install
- name: Generate documents
run: yarn doc
- name: Copy core built files to dist directory
run: |
mkdir -p ${{ env.DOC_DEPLOY_DIR }}/v${{ steps.get_version.outputs.next_version }}
cp -r ${{ env.DOC_DIR }}/* ${{ env.DOC_DEPLOY_DIR }}/v${{ steps.get_version.outputs.next_version }}/
shell: bash
- name: Ahtorization for GCP
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.STORE_CREDENTIALS }}'
- name: Upload API documents files
uses: 'google-github-actions/upload-cloud-storage@v0'
with:
path: ${{ env.DOC_DEPLOY_DIR }}
destination: inou-pro-released/doc/api
parent: false