ci: add build and test job for continuous integration #4
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 & Release | |
| on: | |
| push: | |
| branches: | |
| - beta | |
| permissions: | |
| contents: write | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| if: "contains(github.event.head_commit.message, 'Version Packages')" | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/[email protected] | |
| - uses: actions/[email protected] | |
| with: | |
| node-version: lts/* | |
| cache: 'pnpm' | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Publish to NPM | |
| uses: changesets/[email protected] | |
| with: | |
| publish: pnpm ci:publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |