-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (40 loc) · 1.12 KB
/
wasm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build and test context-js
on:
push:
branches:
- main
tags:
- "*"
pull_request: {}
workflow_dispatch: {}
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup and build wasm
uses: ./.github/actions/setup_build_wasm
if: "!cancelled()"
- name: Upload wasm package
uses: actions/upload-artifact@v4
if: "!cancelled()"
with:
name: context-js-pkg
path: ./context-js/pkg
- name: Test wasm package
if: "!cancelled()"
run: pnpm run --dir ./context-js test
- name: Package wasm package
if: "!cancelled()"
run: pnpm pack --dir ./context-js/pkg
- name: Upload wasm package to S3
uses: ./.github/actions/upload_to_s3
if: "!cancelled() && github.event_name != 'pull_request'"
with:
bucket: ${{ secrets.S3_ASSET_BUCKET }}
name: context-js-0.1.0.tgz
path: context-js/pkg/context-js-0.1.0.tgz
role-to-assume: ${{ secrets.S3_UPLOAD_ROLE_ARN }}