Merge pull request #19 from nicolethoen/general-pf-cleanup #14
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: | |
| call-build-lint-test-workflow: | |
| uses: ./.github/workflows/build-lint-test.yml | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: [call-build-lint-test-workflow] | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Enable Corepack | |
| shell: bash | |
| run: corepack enable | |
| - uses: actions/cache@v4 | |
| id: yarn-cache | |
| name: Load Yarn cache | |
| with: | |
| path: | | |
| .yarn/cache | |
| key: ${{ runner.os }}-yarn-cache-${{ hashFiles('yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn-cache- | |
| - name: Install dependencies | |
| shell: bash | |
| run: yarn install --immutable --network-timeout 100000 | |
| - uses: actions/cache@v4 | |
| id: dist | |
| name: Cache dist | |
| with: | |
| path: | | |
| packages/*/dist | |
| key: ${{ runner.os }}-dist-14-${{ 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 semantic-release@19.0.5 |