Skip to content

chore(deps): update frontend #8739

chore(deps): update frontend

chore(deps): update frontend #8739

name: 'CI-CD @gear-js/api'
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
branches: [main]
push:
branches: [main]
paths:
- api/**
workflow_dispatch:
env:
BINARYEN_VERSION: version_111
jobs:
test:
if: github.event_name == 'pull_request'
runs-on: ubuntu-22.04
env:
RUSTUP_HOME: /tmp/rustup_home
steps:
- name: Cancel previous workflow runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: 'Install: NodeJS 20.x'
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
components: clippy, rustfmt
- name: 'Install: binaryen'
run: |
wget -c https://github.com/WebAssembly/binaryen/releases/download/$BINARYEN_VERSION/binaryen-$BINARYEN_VERSION-x86_64-linux.tar.gz -O - | tar -xz -C .
sudo cp binaryen-$BINARYEN_VERSION/bin/wasm-opt /usr/bin/
- name: 'Install: pkg dependencies'
working-directory: api
run: yarn install
- name: 'Build: @gear-js/api'
working-directory: api
run: yarn build
- name: 'Prepare: build programs'
working-directory: api/programs
run: cargo build --locked
- name: 'Prepare: download Gear node'
run: |
wget -O ./gear https://github.com/gear-tech/gear/releases/download/build/gear
chmod +x gear
- name: 'Prepare: run Gear node'
run: |
nohup ./gear --dev --execution=wasm --tmp --unsafe-rpc-external --rpc-methods Unsafe --rpc-cors all &
- name: 'Prepare: sleep 3 min'
run: sleep 180
- name: 'Test: run'
working-directory: api
run: yarn test
publish-to-npm:
if: github.event_name == 'push'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Use node 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Check package version
uses: EndBug/version-check@v1
id: check
with:
file-name: api/package.json
file-url: https://unpkg.com/@gear-js/api@latest/package.json
static-checking: localIsNew
- name: Install dependencies
if: steps.check.outputs.changed == 'true'
working-directory: api
run: yarn install
- name: Build @gear-js/api
if: steps.check.outputs.changed == 'true'
working-directory: api
run: yarn build
- name: Publish
if: steps.check.outputs.changed == 'true'
working-directory: api/lib
run: |
export token=$(printenv $(printenv GITHUB_ACTOR))
npm config set //registry.npmjs.org/:_authToken=$token
npm publish
env:
osipov-mit: ${{ secrets.OSIPOV_NPM_TOKEN }}