fix wasm runtime err not caught (#1714) #284
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deployment build | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get branch names | |
id: branch-name | |
uses: tj-actions/branch-names@v7 | |
# grab latest sha | |
- name: Setup Environment (PR) | |
if: ${{ github.event_name == 'pull_request' }} | |
shell: bash | |
run: | | |
echo "LAST_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> ${GITHUB_ENV} | |
- name: Setup Environment (Push) | |
if: ${{ github.event_name == 'push' }} | |
shell: bash | |
run: | | |
echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV} | |
# setup + test go and yarn | |
- uses: actions/checkout@v3 | |
- name: go-setup-and-test | |
uses: ./.github/actions/go-setup-and-test | |
- name: yarn-setup-and-test | |
uses: ./.github/actions/yarn-setup-and-test | |
# deploy | |
- name: deploy-workers | |
uses: ./.github/actions/deploy-workers | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
- name: deploy-ui | |
uses: ./.github/actions/deploy-ui | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
# name needs to be "main" if on mainline | |
branch: ${{ steps.branch-name.outputs.base_ref_branch == 'mainline' && 'main' || steps.branch-name.outputs.base_ref_branch }} | |
- name: deploy-db | |
uses: ./.github/actions/deploy-db | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
# name needs to be "main" if on mainline | |
branch: ${{ steps.branch-name.outputs.base_ref_branch == 'mainline' && 'main' || steps.branch-name.outputs.base_ref_branch }} | |
- name: deploy-docs | |
uses: ./.github/actions/deploy-docs | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
# name needs to be "main" if on mainline | |
branch: ${{ steps.branch-name.outputs.base_ref_branch == 'mainline' && 'main' || steps.branch-name.outputs.base_ref_branch }} | |
- name: deploy-wasm | |
uses: ./.github/actions/deploy-wasm | |
with: | |
rcloneConfig: ${{ secrets.CF_RCLONE }} | |
branch: ${{ steps.branch-name.outputs.base_ref_branch }} | |
shareKey: ${{ secrets.AES_KEY }} | |
# build backend artifacts | |
- name: build db | |
uses: ./.github/actions/build-backend-binary | |
with: | |
cmd: db | |
- name: build api gateway | |
uses: ./.github/actions/build-backend-binary | |
with: | |
cmd: jadechamber | |
- name: build discord bot | |
uses: ./.github/actions/build-backend-binary | |
with: | |
cmd: managerchan | |
- name: build share store | |
uses: ./.github/actions/build-backend-binary | |
with: | |
cmd: share | |
- name: build preview generator | |
uses: ./.github/actions/build-backend-binary | |
with: | |
cmd: preview | |
- name: build notification binary | |
uses: ./.github/actions/build-backend-binary | |
with: | |
cmd: notification | |
- name: build compute binary | |
uses: ./.github/actions/build-compute-binary | |
with: | |
cmd: compute | |
# add a file with the hash | |
- name: save hash to file | |
working-directory: ./backend/docker | |
shell: bash | |
run: | | |
echo "${LAST_COMMIT_SHA}" >> hash.txt | |
ls -la | |
# upload artifacts | |
- name: upload db artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: backend-artifacts | |
path: ./backend/docker | |
# organize compute artifacts | |
- name: organize compute artifacts | |
shell: bash | |
run: | | |
mkdir -p ./computebin | |
cp ./backend/docker/hash.txt ./computebin/hash.txt | |
cp ./backend/cmd/compute/compute ./computebin/compute | |
- name: upload compute artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: compute-artifacts | |
path: ./computebin | |
- name: git | |
run: | | |
git status | |
- name: Build Binary | |
run: | | |
# make file runnable, might not be necessary | |
chmod +x "${GITHUB_WORKSPACE}/scripts/build.sh" | |
# run the script | |
"${GITHUB_WORKSPACE}/scripts/build.sh" | |
env: | |
GCSIM_SHARE_KEY: ${{ secrets.AES_KEY }} | |
- name: Release Binary | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
LICENSE | |
gcsim.exe |