feat: Migrate to Nx monorepo, refactor to TypeScript, and add audio-w… #38
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: CI | |
| on: | |
| pull_request: | |
| branches: [master] | |
| push: | |
| branches: [master] | |
| jobs: | |
| test: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm typecheck | |
| - run: pnpm build | |
| - run: pnpm test | |
| release: | |
| if: github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'chore(release)') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| - name: Setup git creds | |
| env: | |
| config_email: ${{ secrets.GIT_CONFIG_EMAIL }} | |
| config_un: ${{ secrets.GIT_CONFIG_USERNAME }} | |
| run: | | |
| git config --local user.email ${config_email} | |
| git config --local user.name ${config_un} | |
| - name: Create the release | |
| run: pnpm release | |
| - name: Push tag and file changes to repository | |
| run: git push --follow-tags origin master | |
| - name: Publish to npm | |
| run: pnpm nx release publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true |