mirror of
https://github.com/alexgo-io/stacks.js.git
synced 2026-05-21 08:32:12 +08:00
BREAKING CHANGE: Removes compatibility with `bip32` package from @stacks/wallet-sdk. Now all derivation methods only rely on HDKey from @scure/bip32. BREAKING CHANGE: To reduce the bundle sizes of applications using Stacks.js we are moving away from Buffer (a polyfill to match Node.js APIs) to Uint8Arrays (which Buffers use in the background anyway). To make the switch easier we have introduced a variety of methods for converting between strings and Uint8Arrays: `hexToBytes`, `bytesToHex`, `utf8ToBytes`, `bytesToUtf8`, `asciiToBytes`, `bytesToAscii`, and `concatBytes`. Co-authored-by: janniks <janniks@users.noreply.github.com>
48 lines
1.7 KiB
YAML
48 lines
1.7 KiB
YAML
name: pull-request
|
|
on: [pull_request, workflow_dispatch]
|
|
|
|
jobs:
|
|
pre-run:
|
|
uses: ./.github/workflows/pre-run.yml
|
|
secrets: inherit
|
|
|
|
tests:
|
|
needs: pre-run
|
|
uses: ./.github/workflows/tests.yml
|
|
|
|
publish-pr:
|
|
runs-on: ubuntu-latest
|
|
needs: [pre-run, tests]
|
|
if: needs.pre-run.outputs.is-not-fork == 'true'
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
if: github.event_name == 'pull_request'
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
|
- uses: actions/checkout@v3
|
|
if: github.event_name == 'workflow_dispatch'
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm run bootstrap
|
|
- id: git-commit
|
|
run: echo "::set-output name=sha::$(git rev-parse --short HEAD)"
|
|
- run: echo $SHA
|
|
env:
|
|
SHA: ${{ steps.git-commit.outputs.sha }}
|
|
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
- run: npx lerna publish prepatch --preid pr.$SHA --dist-tag pr --no-verify-access --no-push --no-git-tag-version --yes
|
|
env:
|
|
SHA: ${{ steps.git-commit.outputs.sha }}
|
|
SKIP_TESTS: true
|
|
- id: published-version
|
|
run: echo "::set-output name=version::$(cat lerna.json | jq -r '.version')"
|
|
- uses: kyranjamie/pull-request-fixed-header@v1.0.1
|
|
with:
|
|
header: "> This PR was published to npm with the version `${{ steps.published-version.outputs.version }}`\n> e.g. `npm install @stacks/common@${{ steps.published-version.outputs.version }} --save-exact`"
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|