Merge pull request #443 from thatblindgeye/iss432 #163
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: release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_CONFIG_LEGACY_PEER_DEPS: true | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: 20 | |
| - run: corepack enable | |
| - uses: actions/cache@v4 | |
| id: yarn-cache | |
| name: Cache npm deps | |
| with: | |
| path: | | |
| node_modules | |
| **/node_modules | |
| ~/.cache/Cypress | |
| key: ${{ runner.os }}-yarn-16-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }} | |
| - run: yarn install --immutable | |
| if: steps.yarn-cache.outputs.cache-hit != 'true' | |
| - uses: actions/cache@v4 | |
| id: dist | |
| name: Cache dist | |
| with: | |
| path: | | |
| packages/*/dist | |
| packages/react-styles/css | |
| key: ${{ runner.os }}-dist-16-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock', 'package.json', 'packages/*/*', '!packages/*/dist', '!packages/*/node_modules') }} | |
| - name: Build dist | |
| run: yarn build | |
| if: steps.dist.outputs.cache-hit != 'true' | |
| - name: Release to NPM | |
| run: cd packages/module && npx [email protected] --legacy-peer-deps |