Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 新增发布 next 命令,使用wpm #7

Merged
merged 1 commit into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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