Skip to content

Commit

Permalink
ci: workflow for publishing snapshot packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tien committed Jun 11, 2024
1 parent 30e1ad7 commit 11d9487
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
@@ -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 }}
6 changes: 3 additions & 3 deletions apps/docs/docs/getting-started/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ First add React DOT, along with required packages as dependencies to your React
<Tabs>
<TabItem value="npm" label="npm" default>
```sh
npm add @reactive-dot/react polkadot-api
npm add @reactive-dot/react@snapshot polkadot-api
```
</TabItem>
<TabItem value="yarn" label="yarn">
```sh
yarn add @reactive-dot/react polkadot-api
yarn add @reactive-dot/react@snapshot polkadot-api
```
</TabItem>
<TabItem value="pnpm" label="pnpm">
```sh
pnpm add @reactive-dot/react polkadot-api
pnpm add @reactive-dot/react@snapshot polkadot-api
```
</TabItem>
</Tabs>
Expand Down

0 comments on commit 11d9487

Please sign in to comment.