mirror of
https://github.com/trycua/computer.git
synced 2026-01-04 12:30:08 -06:00
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
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 }}
|