Merge pull request #395 from trycua/fix/restore-developer-guide #105
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 @trycua/computer to npm | |
on: | |
push: | |
branches: main | |
jobs: | |
publish: | |
permissions: | |
id-token: write | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 24.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "24.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Setup pnpm 10 | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
- name: Check if version changed | |
id: check-version | |
uses: EndBug/version-check@v2 | |
with: | |
file-name: libs/typescript/computer/package.json | |
diff-search: true | |
- name: Install dependencies | |
if: steps.check-version.outputs.changed == 'true' | |
working-directory: ./libs/typescript/computer | |
run: pnpm install --frozen-lockfile | |
- name: Build package | |
if: steps.check-version.outputs.changed == 'true' | |
working-directory: ./libs/typescript/computer | |
run: pnpm run build --if-present | |
- name: Publish to npm | |
if: steps.check-version.outputs.changed == 'true' | |
working-directory: ./libs/typescript/computer | |
run: pnpm publish --access public --no-git-checks | |
env: | |
NPM_CONFIG_PROVENANCE: true | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |