diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml new file mode 100644 index 00000000..84308e0c --- /dev/null +++ b/.github/workflows/packages.yml @@ -0,0 +1,25 @@ +name: Packages + +on: + push: + branches: [main] + +jobs: + publish-snapshot: + if: github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # https://github.com/yarnpkg/berry/issues/4014 + fetch-depth: 0 + + - uses: ./.github/actions/setup + + - run: yarn nx run-many -t build --projects="packages/*" + + - run: yarn workspaces foreach -At --no-private version 0.0.0-snapshot.$(git rev-parse --short HEAD) --immediate + + - run: yarn workspaces foreach -At --no-private npm publish --access public --tag snapshot --tolerate-republish + env: + YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/apps/docs/docs/getting-started/setup.mdx b/apps/docs/docs/getting-started/setup.mdx index 8e715406..429166c6 100644 --- a/apps/docs/docs/getting-started/setup.mdx +++ b/apps/docs/docs/getting-started/setup.mdx @@ -18,17 +18,17 @@ First add React DOT, along with required packages as dependencies to your React ```sh - npm add @reactive-dot/react polkadot-api + npm add @reactive-dot/react@snapshot polkadot-api ``` ```sh - yarn add @reactive-dot/react polkadot-api + yarn add @reactive-dot/react@snapshot polkadot-api ``` ```sh - pnpm add @reactive-dot/react polkadot-api + pnpm add @reactive-dot/react@snapshot polkadot-api ```