mirror of
https://github.com/trycua/computer.git
synced 2026-01-04 12:30:08 -06:00
Update npm packages to publish if version changes
This commit is contained in:
14
.github/workflows/npm-publish-computer.yml
vendored
14
.github/workflows/npm-publish-computer.yml
vendored
@@ -2,8 +2,7 @@ name: Publish @trycua/computer to npm
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "computer-v*"
|
||||
branches: main
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
@@ -20,15 +19,26 @@ jobs:
|
||||
node-version: "24.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Check if version changed
|
||||
id: check-version
|
||||
uses: EndBug/version-check@v2
|
||||
with:
|
||||
file-name: libs/typescript/computer/package.json
|
||||
static-checking: localIsNew
|
||||
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:
|
||||
|
||||
14
.github/workflows/npm-publish-core.yml
vendored
14
.github/workflows/npm-publish-core.yml
vendored
@@ -2,8 +2,7 @@ name: Publish @trycua/core to npm
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "core-v*"
|
||||
branches: main
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
@@ -20,15 +19,26 @@ jobs:
|
||||
node-version: "24.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Check if version changed
|
||||
id: check-version
|
||||
uses: EndBug/version-check@v2
|
||||
with:
|
||||
file-name: libs/typescript/core/package.json
|
||||
static-checking: localIsNew
|
||||
diff-search: true
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.check-version.outputs.changed == 'true'
|
||||
working-directory: ./libs/typescript/core
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build package
|
||||
if: steps.check-version.outputs.changed == 'true'
|
||||
working-directory: ./libs/typescript/core
|
||||
run: pnpm run build --if-present
|
||||
|
||||
- name: Publish to npm
|
||||
if: steps.check-version.outputs.changed == 'true'
|
||||
working-directory: ./libs/typescript/core
|
||||
run: pnpm publish --access public --no-git-checks
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user