Update peer deps #6
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 to NPM | |
| # publish only when package json has changed - assuming version upgrade | |
| on: | |
| push: | |
| branches: [main] | |
| paths: "packages/zustand-sync-tabs/package.json" | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: write | |
| id-token: write | |
| defaults: | |
| run: | |
| working-directory: ./packages/zustand-sync-tabs | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| registry-url: https://registry.npmjs.org | |
| - run: npm i -g pnpm && pnpm i | |
| name: Install dependencies | |
| - name: Publish to NPM | |
| run: | | |
| pnpm build && cd dist && npm publish --provenance --access public | |
| sed -i -e "s/.*name.*/\t\"name\": \"zustand-sync\",/" package.json && npm publish --provenance --access public | |
| sed -i -e "s/.*name.*/\t\"name\": \"sync-zustand\",/" package.json && npm publish --provenance --access public | |
| sed -i -e "s/.*name.*/\t\"name\": \"sync-tabs-zustand\",/" package.json && npm publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |