mirror of
https://github.com/VisActor/VTable
synced 2024-11-21 17:40:10 +00:00
chore: release workflow
This commit is contained in:
parent
0cc8a0b146
commit
87aa8e6c39
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -24,6 +24,8 @@ Thank you!
|
||||
- [ ] Site / documentation update
|
||||
- [ ] Demo update
|
||||
- [ ] Workflow
|
||||
- [ ] Chore
|
||||
- [ ] Release
|
||||
- [ ] Other (about what?)
|
||||
|
||||
### 🔗 Related issue link
|
||||
|
2
.github/PULL_REQUEST_TEMPLATE/pr_cn.md
vendored
2
.github/PULL_REQUEST_TEMPLATE/pr_cn.md
vendored
@ -22,6 +22,8 @@
|
||||
- [ ] 网站/文档更新
|
||||
- [ ] demo 更新
|
||||
- [ ] Workflow
|
||||
- [ ] 配置修改
|
||||
- [ ] 发布
|
||||
- [ ] 其他 (具体是什么,请补充?)
|
||||
|
||||
### 🔗 相关 issue 连接
|
||||
|
19
.github/workflows/pre-release.yml
vendored
19
.github/workflows/pre-release.yml
vendored
@ -35,33 +35,34 @@ jobs:
|
||||
|
||||
- name: Parse semver version from branch name
|
||||
id: semver_parser
|
||||
uses: release-kit/semver@v2
|
||||
uses: xile611/read-package-version-action@v2.1
|
||||
with:
|
||||
string: ${{ github.ref_name }}
|
||||
pattern: '^pre-release/(.*)$' # ^v?(.*)$ by default
|
||||
path: packages/vtable
|
||||
semver_string: ${{ github.ref_name }}
|
||||
semver_pattern: '^pre-release/(.*)$' # ^v?(.*)$ by default
|
||||
|
||||
- name: Apply prereleaseName
|
||||
run: node common/scripts/install-run-rush.js publish --apply --prerelease-name ${{ steps.semver_parser.outputs.prerelease }} --partial-prerelease
|
||||
run: node common/scripts/install-run-rush.js publish --apply --prerelease-name ${{ steps.semver_parser.outputs.pre_release_name }} --partial-prerelease
|
||||
|
||||
- name: Publish to npm
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
run: node common/scripts/install-run-rush.js publish --publish --include-all --tag ${{ steps.semver_parser.outputs.prerelease }}
|
||||
run: node common/scripts/install-run-rush.js publish --publish --include-all --tag ${{ steps.semver_parser.outputs.pre_release_type }}
|
||||
|
||||
- name: Update shrinkwrap
|
||||
run: node common/scripts/install-run-rush.js update
|
||||
|
||||
- name: Get package version
|
||||
- name: Get npm version
|
||||
id: package-version
|
||||
uses: culshaw/read-package-node-version-actions@v1
|
||||
uses: xile611/read-package-version-action@v2.1
|
||||
with:
|
||||
path: './packages/vtable' # 各项目需要修改一下
|
||||
path: packages/vtable
|
||||
|
||||
- name: Commit & Push changes
|
||||
uses: actions-js/push@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
message: 'build: prelease version ${{ steps.package-version.outputs.version }}'
|
||||
message: 'build: prelease version ${{ steps.package-version.outputs.current_version }}'
|
||||
branch: ${{ github.ref_name }}
|
||||
author_name: ${{ github.actor }}
|
||||
|
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
@ -35,6 +35,9 @@ jobs:
|
||||
run: node common/scripts/install-run-rush.js install --bypass-policy
|
||||
|
||||
- name: Build packages
|
||||
run: node common/scripts/install-run-rush.js build --only tag:package
|
||||
|
||||
- name: Update version
|
||||
run: node common/scripts/install-run-rush.js version --bump
|
||||
|
||||
- name: Publish to npm
|
||||
@ -46,35 +49,36 @@ jobs:
|
||||
- name: Update shrinkwrap
|
||||
run: node common/scripts/install-run-rush.js update
|
||||
|
||||
- name: Get package version
|
||||
- name: Get npm version
|
||||
id: package-version
|
||||
uses: culshaw/read-package-node-version-actions@v1
|
||||
uses: xile611/read-package-version-action@v2.1
|
||||
with:
|
||||
path: './packages/vtable' # 各项目修改一下
|
||||
path: packages/vtable
|
||||
|
||||
- name: Commit & Push changes
|
||||
uses: actions-js/push@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
message: 'build: prelease version ${{ steps.package-version.outputs.version }}'
|
||||
message: 'build: prelease version ${{ steps.package-version.outputs.current_version }}'
|
||||
branch: ${{ github.ref_name }}
|
||||
|
||||
- name: Create Release for Tag
|
||||
id: release_tag
|
||||
# See more about this action: https://github.com/actions/create-release
|
||||
uses: actions/create-release@v1
|
||||
uses: ncipollo/release-action@v1.12.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: v${{ steps.package-version.outputs.version }}
|
||||
release_name: Release v${{ steps.package-version.outputs.version }}
|
||||
prerelease: false #
|
||||
tag: v${{ steps.package-version.outputs.current_version }}
|
||||
commit: main
|
||||
prerelease: false
|
||||
draft: true #
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
uses: dustinirving/create-pr@v1.0.2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
title: '[Auto release] release ${{ steps.package-version.outputs.current_version }}'
|
||||
base: main
|
||||
branch: ${{ github.ref_name }}
|
||||
title: '[Auto release] release ${{ steps.package-version.outputs.version }}'
|
||||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
|
||||
head: ${{ github.ref_name }}
|
||||
labels: release # default labels, the action will throw error if not specified
|
||||
reviewers: fangsmile,Rui-Sun # default reviewers, the action will throw error if not specified
|
||||
|
@ -24,7 +24,7 @@ if [[ $STAGE_FILES != "" ]] ; then
|
||||
if [[ $changedFiles != "" ]] ; then
|
||||
|
||||
echo "
|
||||
[Notice]: please check, do you need to run ${RED}${BIG_FONT}rush change${RESET} to generate changelog,
|
||||
[Notice]: please check, do you need to run ${RED}${BIG_FONT}rush change-all${RESET} to generate changelog,
|
||||
you has modified some src files, include:
|
||||
${changedFiles}
|
||||
"
|
||||
|
Loading…
Reference in New Issue
Block a user