ci: add npm provenance and upgrade version

This commit is contained in:
chenshenhai 2023-10-15 13:45:14 +08:00
parent b82dd93065
commit 8746bd45f1
11 changed files with 44 additions and 2729 deletions

View file

@ -5,6 +5,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
@ -16,21 +19,21 @@ jobs:
- run: pnpm i
- run: npm run test
- run: npm run build
- run: npm publish -w ./packages/types --tag next
- run: npm publish --provenance --access public -w ./packages/types --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish -w ./packages/util --tag next
- run: npm publish --provenance --access public -w ./packages/util --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish -w ./packages/renderer --tag next
- run: npm publish --provenance --access public -w ./packages/renderer --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish -w ./packages/board --tag next
- run: npm publish --provenance --access public -w ./packages/board --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish -w ./packages/core --tag next
- run: npm publish --provenance --access public -w ./packages/core --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish -w ./packages/idraw --tag next
- run: npm publish --provenance --access public -w ./packages/idraw --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View file

@ -1,4 +0,0 @@
{
"packages": ["packages/types", "packages/util", "packages/board", "packages/renderer", "packages/core", "packages/idraw"],
"version": "0.4.0-alpha.0"
}

View file

@ -1,6 +1,6 @@
{
"private": false,
"version": "0.4.0-alpha.2",
"version": "0.4.0-alpha.3",
"workspaces": [
"packages/*"
],
@ -25,8 +25,6 @@
"precommit": "npm run lint",
"prepush": "npm run lint",
"clear:jest": "rm -rf ./packages/*/__tests__/__snapshots__",
"pu": "pnpm i && npm run build && lerna publish --force-publish",
"pu2": "lerna version && npm run build && lerna publish from-git --force-publish",
"upgrade:version": "vite-node ./scripts/upgrade-version.ts && pnpm i"
},
"devDependencies": {
@ -59,7 +57,6 @@
"jest-environment-jsdom": "^29.7.0",
"jimp": "^0.22.10",
"koa-compose": "^4.1.0",
"lerna": "^7.3.0",
"less": "^4.2.0",
"pixelmatch": "^5.3.0",
"pngjs": "^7.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "@idraw/board",
"version": "0.4.0-alpha.2",
"version": "0.4.0-alpha.3",
"description": "",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
@ -24,8 +24,8 @@
"@idraw/types": "^0.4.0-alpha.0"
},
"dependencies": {
"@idraw/util": "^0.4.0-alpha.2",
"@idraw/renderer": "^0.4.0-alpha.2"
"@idraw/util": "^0.4.0-alpha.3",
"@idraw/renderer": "^0.4.0-alpha.3"
},
"publishConfig": {
"access": "public"

View file

@ -1,6 +1,6 @@
{
"name": "@idraw/core",
"version": "0.4.0-alpha.2",
"version": "0.4.0-alpha.3",
"description": "",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
@ -24,9 +24,9 @@
"@idraw/types": "^0.4.0-alpha.0"
},
"dependencies": {
"@idraw/board": "^0.4.0-alpha.2",
"@idraw/renderer": "^0.4.0-alpha.2",
"@idraw/util": "^0.4.0-alpha.2"
"@idraw/board": "^0.4.0-alpha.3",
"@idraw/renderer": "^0.4.0-alpha.3",
"@idraw/util": "^0.4.0-alpha.3"
},
"publishConfig": {
"access": "public"

View file

@ -1,6 +1,6 @@
{
"name": "idraw",
"version": "0.4.0-alpha.2",
"version": "0.4.0-alpha.3",
"description": "",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
@ -24,8 +24,8 @@
"@idraw/types": "^0.4.0-alpha.0"
},
"dependencies": {
"@idraw/core": "^0.4.0-alpha.2",
"@idraw/util": "^0.4.0-alpha.2"
"@idraw/core": "^0.4.0-alpha.3",
"@idraw/util": "^0.4.0-alpha.3"
},
"publishConfig": {
"access": "public"

View file

@ -1,10 +1,10 @@
{
"name": "@idraw/lab",
"version": "0.4.0-alpha.2",
"version": "0.4.0-alpha.3",
"dependencies": {
"@ant-design/icons": "^5.1.3",
"@idraw/core": "^0.4.0-alpha.2",
"@idraw/util": "^0.4.0-alpha.2",
"@idraw/core": "^0.4.0-alpha.3",
"@idraw/util": "^0.4.0-alpha.3",
"antd": "^5.5.0",
"classnames": "^2.3.2",
"react": "^18.2.0",

View file

@ -1,6 +1,6 @@
{
"name": "@idraw/renderer",
"version": "0.4.0-alpha.2",
"version": "0.4.0-alpha.3",
"description": "",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
@ -24,7 +24,7 @@
"@idraw/types": "^0.4.0-alpha.0"
},
"dependencies": {
"@idraw/util": "^0.4.0-alpha.2"
"@idraw/util": "^0.4.0-alpha.3"
},
"publishConfig": {
"access": "public"

View file

@ -1,6 +1,6 @@
{
"name": "@idraw/types",
"version": "0.4.0-alpha.2",
"version": "0.4.0-alpha.3",
"description": "",
"main": "src/index.ts",
"types": "src/index.ts",

View file

@ -1,6 +1,6 @@
{
"name": "@idraw/util",
"version": "0.4.0-alpha.2",
"version": "0.4.0-alpha.3",
"description": "",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",

File diff suppressed because it is too large Load diff