data-plane-controller for managing data-plane life cycles #651
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: Flow-web CI | |
# Controls when the action will run. Triggers the workflow on push | |
# or pull request events, but only for the primary branch. | |
on: | |
push: | |
branches: [master] | |
paths: | |
- "crates/flow-web/**" | |
- "Cargo.lock" | |
pull_request: | |
branches: [master] | |
paths: | |
- ".github/workflows/flow-web.yaml" | |
- "crates/flow-web/**" | |
- "Cargo.lock" | |
jobs: | |
buildAndPublish: | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: wasm32-unknown-unknown | |
- name: Install wasm-bindgen | |
run: | | |
curl -sSL https://github.com/rustwasm/wasm-bindgen/releases/download/0.2.93/wasm-bindgen-0.2.93-x86_64-unknown-linux-musl.tar.gz | tar -zxv | |
mv wasm-bindgen-0.2.93-x86_64-unknown-linux-musl/wasm* ~/.cargo/bin/ | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Build flow-web | |
run: wasm-pack build --scope estuary crates/flow-web --out-name flow_web | |
# Fix from: https://github.com/rustwasm/wasm-pack/issues/1039#issuecomment-1712491804 | |
# We need to manually insert the main ref until this fix is published | |
# https://github.com/rustwasm/wasm-pack/pull/1061 | |
- name: Manually update package.json | |
run: | | |
npm pkg set type='module' --prefix crates/flow-web/pkg | |
npm pkg set main='flow_web.js' --prefix crates/flow-web/pkg | |
- name: Publish flow-web | |
if: ${{ github.ref == 'refs/heads/master' }} | |
run: | | |
cd crates/flow-web/pkg | |
echo '//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}' > .npmrc | |
echo '@estuary:registry=https://npm.pkg.github.com' >> .npmrc | |
wasm-pack publish --access=public --tag=dev | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |