Skip to content

Commit

Permalink
Merge pull request #7 from cmm-va/#add-wpm
Browse files Browse the repository at this point in the history
fix: 新增发布 next 命令,使用wpm
  • Loading branch information
cmm-va authored May 10, 2023
2 parents e383b8d + 37ccbc1 commit 01b7fc0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Authenticate
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.PUBLISH_PACKAGE_TOKEN }}" > ~/.npmrc
echo "@atinc:registry=https://npm.pkg.github.com/" >> ~/.npmrc
- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -49,17 +45,15 @@ jobs:
git config user.email [email protected]
npm run pub
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish-next
if: startsWith(github.head_ref, 'release-auto-next-v')
run: |
git config user.name github-actions
git config user.email [email protected]
git config user.email [email protected]
npm run pub-next
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Unset authenticate
run: rm ~/.npmrc
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Read package.json
id: read-version
uses: notiz-dev/github-action-json-property@release
Expand Down
12 changes: 12 additions & 0 deletions .wpmrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
allowBranch: ['master', 'release-auto-*'],
bumpFiles: ['package.json', 'package-lock.json', 'packages/gantt/package.json'],
skip: {
confirm: true
},
tagPrefix: '',
hooks: {
prepublish: 'npm run build',
postpublish: 'npm run pub-only'
}
};
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@
"build:styles": "cpx \"./packages/gantt/src/**/*.scss\" dist/gantt",
"test": "ng test",
"lint": "ng lint",
"release": "standard-version",
"release": "wpm release --release-branch-format release-auto-v{{version}}",
"release-next": "wpm release --release-branch-format release-auto-next-v{{version}}",
"pub-only": "cd dist/gantt && npm publish --access=public",
"pub": "npm run build && npm run pub-only",
"pub": "wpm publish && npm run pub-only",
"pub-next": "wpm publish && npm run pub-next-only",
"pub-next-only": "npm run pub-next-gantt-only",
"pub-next-gantt-only": "cd ./dist/gantt && npm publish --tag next",
"report-coverage": "cat ./coverage/gantt/lcov.info | coveralls",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --pkg ./packages/gantt/package.json",
"contributors:init": "all-contributors init",
Expand All @@ -40,6 +44,7 @@
"@angular/platform-browser": "^15.0.4",
"@angular/platform-browser-dynamic": "^15.0.4",
"@angular/router": "^15.0.4",
"@worktile/pkg-manager": "^0.0.11",
"cpx": "^1.5.0",
"date-fns": "^2.14.0",
"html2canvas": "1.0.0-rc.7",
Expand Down

0 comments on commit 01b7fc0

Please sign in to comment.