-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
207 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,56 @@ | ||
# name: Build | ||
|
||
# on: | ||
# push: | ||
# tags: | ||
# - "v*" | ||
# branches: | ||
# - main | ||
|
||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: 安装 Node.js | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: 18 | ||
# registry-url: https://registry.npmjs.org/ | ||
|
||
# - name: 安装依赖 | ||
# run: npm i | ||
|
||
# - name: 安装 vsce | ||
# run: npm install -g vsce | ||
|
||
# # - name: 编译 | ||
# # run: vsce package -o dist.vsix | ||
|
||
# # - name: 上传 | ||
# # uses: actions/upload-artifact@v3 | ||
# # with: | ||
# # name: code-coverage-report | ||
# # path: dist.vsix | ||
|
||
# - name: 编译上传 | ||
# run: vsce publish -p ${{ secrets.VSCODE_PUBLISHER_TOKEN }} | ||
name: Build | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
|
||
- name: 安装 Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: 安装依赖 | ||
run: npm i | ||
|
||
- name: 安装 vsce | ||
run: npm install -g vsce | ||
|
||
- name: 获取版本号 | ||
id: get_tag | ||
run: | | ||
TAG_NAME=${GITHUB_REF#refs/tags/} | ||
VERSION=${TAG_NAME#v} | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: 更新 npm 版本号 | ||
run: npm version $VERSION --no-git-tag-version | ||
env: | ||
VERSION: ${{ env.VERSION }} | ||
|
||
- name: Configure git | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Commit changes | ||
run: | | ||
git add package.json | ||
git commit -m "CI Update version to $VERSION" | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION: ${{ env.VERSION }} | ||
|
||
- name: 编译上传 | ||
run: vsce publish -p ${{ secrets.VSCODE_PUBLISHER_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: CI test | ||
|
||
on: | ||
push: | ||
tags: | ||
- test-* | ||
# branches: | ||
# - ci-test | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ci-test | ||
|
||
# - name: 安装 Node.js | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: 18 | ||
# registry-url: https://registry.npmjs.org/ | ||
|
||
# - name: 获取版本号 | ||
# id: get_tag | ||
# run: | | ||
# TAG_NAME=${GITHUB_REF#refs/tags/} | ||
# VERSION=${TAG_NAME#v} | ||
# echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
|
||
# - name: 更新 NPM 版本号 | ||
# run: npm version $VERSION --no-git-tag-version | ||
# env: | ||
# VERSION: ${{ env.VERSION }} | ||
|
||
- name: Configure git | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Commit changes | ||
run: | | ||
git checkout ci-test | ||
# git add package.json | ||
# git commit -m "Update version to $VERSION" | ||
# git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION: ${{ env.VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters