v0.3.0 #4
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['22.x'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get Extension Version | |
shell: bash | |
run: | | |
echo "extensionVersion=$(node -p "require('./package.json').version")" >> $GITHUB_ENV | |
- name: Package VS Code extension | |
id: package | |
uses: nhedger/package-vscode-extension@main #放心版本号是和打包是你写的版本号一致 路径都是一样版本号变一下就行 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: soberjs-vscode-${{ env.extensionVersion }}.vsix | |
path: /home/runner/work/soberjs-vscode/soberjs-vscode/soberjs-vscode-${{ env.extensionVersion }}.vsix | |
compression-level: 0 | |
if-no-files-found: error | |
# 既然发布不了就别发布了 | |
# - name: Release #这里有些问题发布不了,不过你可以从artifact下载 | |
# uses: softprops/action-gh-release@v2 | |
# if: startsWith(github.ref, 'refs/tags/') | |
# with: | |
# tag_name: ${{ env.extensionVersion }} | |
# name: ${{ env.extensionVersion }} | |
# body_path: CHANGELOG.md | |
# draft: false | |
# prerelease: false | |
# files: | #注意!!!每次更新必须手动更新版本号 | |
# /home/runner/work/soberjs-vscode/soberjs-vscode/soberjs-vscode-${{ env.extensionVersion }}.vsix |