Release #27
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: | |
| workflow_dispatch: | |
| jobs: | |
| npm: | |
| name: Build and Publish to NPM | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ./.nvmrc | |
| cache: pnpm | |
| # Ensure npm 11.5.1 or later is installed for trusted publishing support | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - name: Install dependencies and build | |
| run: | | |
| cd packages/sync-engine | |
| pnpm install --frozen-lockfile | |
| pnpm run build | |
| - name: Publish to npm | |
| run: | | |
| cd packages/sync-engine | |
| echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
| npm publish --access public | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |