Skip to content

🐎 ci: 测试ci

🐎 ci: 测试ci #19

Workflow file for this run

name: Build
on:
push:
tags:
- "v*.*.*"
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: 获取版本号
id: get_tag
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
VERSION=${TAG_NAME#v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Print version
run: |
echo "The extracted version is: $VERSION"
env:
VERSION: ${{ env.VERSION }}
# - name: 更新 NPM 版本号
# run: npm version $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 "Update version to $VERSION"
# git push
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: 编译上传
# run: vsce publish -p ${{ secrets.VSCODE_PUBLISHER_TOKEN }}