mirror of
https://github.com/trycua/computer.git
synced 2026-01-04 12:30:08 -06:00
Merge pull request #313 from trycua/feature/typescript/versioning
[Typescript] Publish packages based on package.json.
This commit is contained in:
21
.github/workflows/npm-publish-computer.yml
vendored
21
.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,16 +19,28 @@ 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: npm ci
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build package
|
||||
if: steps.check-version.outputs.changed == 'true'
|
||||
working-directory: ./libs/typescript/computer
|
||||
run: npm run build --if-present
|
||||
run: pnpm run build --if-present
|
||||
|
||||
- name: Publish to npm
|
||||
if: steps.check-version.outputs.changed == 'true'
|
||||
working-directory: ./libs/typescript/computer
|
||||
run: npm publish --provenance --access public
|
||||
run: pnpm publish --access public --no-git-checks
|
||||
env:
|
||||
NPM_CONFIG_PROVENANCE: true
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
21
.github/workflows/npm-publish-core.yml
vendored
21
.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,16 +19,28 @@ 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: npm ci
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build package
|
||||
if: steps.check-version.outputs.changed == 'true'
|
||||
working-directory: ./libs/typescript/core
|
||||
run: npm run build --if-present
|
||||
run: pnpm run build --if-present
|
||||
|
||||
- name: Publish to npm
|
||||
if: steps.check-version.outputs.changed == 'true'
|
||||
working-directory: ./libs/typescript/core
|
||||
run: npm publish --provenance --access public
|
||||
run: pnpm publish --access public --no-git-checks
|
||||
env:
|
||||
NPM_CONFIG_PROVENANCE: true
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { defineConfig } from 'tsdown';
|
||||
export default defineConfig([
|
||||
{
|
||||
entry: ['./src/index.ts'],
|
||||
platform: 'neutral',
|
||||
platform: 'node',
|
||||
dts: true,
|
||||
},
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user