Skip to content

Commit

Permalink
Merge pull request #314 from idrawjs/dev-v0.4
Browse files Browse the repository at this point in the history
Dev v0.4
  • Loading branch information
chenshenhai committed May 19, 2024
2 parents 709a2b6 + 0c1b3b4 commit f4866ff
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,23 @@ jobs:
- run: pnpm i
- run: npm run test
- run: npm run build
- run: npm run version:reset-for-release
# - run: npm publish --provenance --access public -w ./packages/types --tag next
- run: pnpm publish --no-git-checks --provenance --access public -w ./packages/types
- run: npm publish --provenance --access public -w ./packages/types
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm publish --no-git-checks --provenance --access public -w ./packages/util
- run: npm publish --provenance --access public -w ./packages/util
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm publish --no-git-checks --provenance --access public -w ./packages/renderer
- run: npm publish --provenance --access public -w ./packages/renderer
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm publish --no-git-checks --provenance --access public -w ./packages/board
- run: npm publish --provenance --access public -w ./packages/board
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm publish --no-git-checks --provenance --access public -w ./packages/core
- run: npm publish --provenance --access public -w ./packages/core
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm publish --no-git-checks --provenance --access public -w ./packages/idraw
- run: npm publish --provenance --access public -w ./packages/idraw
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"precommit": "npm run lint",
"prepush": "npm run lint",
"clear:jest": "rm -rf ./packages/*/__tests__/__snapshots__",
"upgrade:version": "ts-node --project ./tsconfig.node.json ./scripts/upgrade-version.ts && pnpm i"
"version:reset": "ts-node --project ./tsconfig.node.json ./scripts/upgrade-version.ts",
"version:reset-for-release": "ts-node --project ./tsconfig.node.json ./scripts/upgrade-version.ts --for-release",
"upgrade:version": "version:reset && pnpm i"
},
"devDependencies": {
"@babel/core": "^7.24.4",
Expand Down
6 changes: 5 additions & 1 deletion scripts/upgrade-version.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import process from 'node:process';
import { readJSONFile, writeJSONFile } from './util/file';
import { getRootPackageJSON, getAllSubPackageDirs } from './util/project';
const pkg = getRootPackageJSON();
const version = pkg.version;

const workspacePrefix = 'workspace:';
let workspacePrefix = 'workspace:';
if (process.argv[2] === '--for-release') {
workspacePrefix = '';
}

async function run(): Promise<void> {
const pkgDirs = getAllSubPackageDirs();
Expand Down

0 comments on commit f4866ff

Please sign in to comment.