Merge pull request #20 from BitGo/2652.bitgo-psbt-subset #19
This file contains hidden or 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: Publish @bitgo/wasm-utxo | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - beta | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| publish: | |
| name: Publish Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1 | |
| with: | |
| toolchain: nightly | |
| - name: Install wasm tools | |
| run: | | |
| rustup component add rustfmt | |
| cargo install wasm-pack --version 0.13.1 | |
| cargo install wasm-opt --version 0.116.1 | |
| - name: Build Info | |
| run: | | |
| echo "node $(node --version)" | |
| echo "npm $(npm --version)" | |
| echo "rustc $(rustc --version)" | |
| echo "wasm-pack $(wasm-pack --version)" | |
| echo "wasm-opt $(wasm-opt --version)" | |
| git --version | |
| echo "base ref $GITHUB_BASE_REF" | |
| echo "head ref $GITHUB_HEAD_REF" | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Configure NPM | |
| run: | | |
| echo "workspaces-update = false" >> .npmrc | |
| echo "@bitgo:registry=https://registry.npmjs.org" >> .npmrc | |
| echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Install Packages | |
| run: npm ci --workspaces --include-workspace-root | |
| - name: build packages | |
| run: npm --workspaces run build | |
| - name: Unit Test | |
| run: npm --workspaces test | |
| - name: Release | |
| run: npx lerna publish --yes --no-verify-access | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |