Publish #104
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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "*" | |
| jobs: | |
| publish-all: | |
| name: Publish all packages | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "yarn" | |
| - name: Setup Turbo | |
| run: | | |
| npx -y turbo prune \ | |
| @storybooker/core \ | |
| @storybooker/aws \ | |
| @storybooker/azure \ | |
| @storybooker/gcp \ | |
| @storybooker/ui \ | |
| @storybooker/redis \ | |
| storybooker | |
| cp tsconfig.base.json out/tsconfig.base.json | |
| cp .oxlintrc.json out/.oxlintrc.json | |
| cp -R scripts out/scripts | |
| - name: Install dependencies | |
| working-directory: ./out | |
| run: yarn install --immutable | |
| env: | |
| NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
| - name: Verify | |
| working-directory: ./out | |
| run: npx turbo verify | |
| - name: Publish on JSR - Core | |
| working-directory: ./out/packages/core | |
| continue-on-error: true | |
| run: npx -y jsr publish --token ${{ secrets.JSR_API_TOKEN }} --allow-slow-types | |
| - name: Publish on NPM | |
| working-directory: ./out | |
| run: yarn publish:npm | |
| env: | |
| NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |