-
Notifications
You must be signed in to change notification settings - Fork 83
121 lines (117 loc) · 4.4 KB
/
release-please.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
on:
push:
branches:
- main
tags:
- "wasmer-sdk-*"
permissions:
contents: write
pull-requests: write
name: Run Release Please
jobs:
release-please:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/wasmer-sdk-')
steps:
- name: Install release-please
run: npm install --global [email protected]
- name: Update the Release PR
run: |
release-please release-pr \
--debug \
--token=${{ secrets.RELEASE_PLEASE_GH_TOKEN }} \
--repo-url=${{ github.repositoryUrl }} \
--config-file=.github/release-please/config.json \
--manifest-file=.github/release-please/manifest.json
- name: Publish the GitHub Release
run: |
release-please github-release \
--debug \
--token=${{ secrets.RELEASE_PLEASE_GH_TOKEN }} \
--repo-url=${{ github.repositoryUrl }} \
--config-file=.github/release-please/config.json \
--manifest-file=.github/release-please/manifest.json
publish-to-npm:
runs-on: ubuntu-latest
needs:
- release-please
if: startsWith(github.ref, 'refs/tags/wasmer-sdk-')
steps:
# The logic below handles the npm publication:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
- name: Setup Rust
uses: dsherret/rust-toolchain-file@v1
- name: Install wasm-pack
uses: taiki-e/install-action@wasm-pack
- name: Install wasm-strip and wasm-opt
run: sudo apt-get update && sudo apt-get install -y wabt binaryen
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install JS Dependencies
run: npm ci
- name: Build Packages
run: npm run build
# Release Please has already incremented versions and published tags, so
# we just need to publish to NPM
- name: Publish to NPM
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-to-edge:
name: Publish to Wasmer Edge
runs-on: ubuntu-latest
needs:
- release-please
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Rust
uses: dsherret/rust-toolchain-file@v1
- name: Install wasm-pack
uses: taiki-e/install-action@wasm-pack
- name: Setup Wasmer
uses: wasmerio/setup-wasmer@v2
- name: Install wasm-strip and wasm-opt
run: sudo apt-get update && sudo apt-get install -y wabt binaryen
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install @wasmer/sdk Dependencies
run: npm ci
- name: Build @wasmer/sdk
run: npm run build
- name: Generate API Docs
run: npm run docs
- name: Deploy API Docs to wasmer.io
run: wasmer deploy --registry="https://registry.wasmer.io/graphql" --token=${{ secrets.WASMER_CIUSER_PROD_TOKEN }} --non-interactive --no-wait --no-persist-id --publish-package --owner=wasmer-examples
continue-on-error: true
working-directory: docs
- name: Install wasmer.sh dependencies
run: npm ci
working-directory: examples/wasmer.sh
- name: Build wasmer.sh
run: npm run build
working-directory: examples/wasmer.sh
- name: Deploy wasmer.sh to wasmer.io
run: wasmer deploy --registry="https://registry.wasmer.io/graphql" --token=${{ secrets.WASMER_CIUSER_PROD_TOKEN }} --non-interactive --no-wait --no-persist-id --publish-package --owner=wasmer
continue-on-error: true
working-directory: examples/wasmer.sh
- name: Install ffmpeg-react dependencies
run: npm ci
working-directory: examples/ffmpeg-react
- name: Build ffmpeg-react
run: npm run build
working-directory: examples/ffmpeg-react
- name: Deploy ffmpeg-react to wasmer.io
run: wasmer deploy --registry="https://registry.wasmer.io/graphql" --token=${{ secrets.WASMER_CIUSER_PROD_TOKEN }} --non-interactive --no-wait --no-persist-id --publish-package --owner=wasmer-examples
continue-on-error: true
working-directory: examples/ffmpeg-react