Skip to content

update vsce package #14

update vsce package

update vsce package #14

Workflow file for this run

name: Build vsce package
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set env
run:
echo echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
echo "VERSION=$(grep version package.json | sed -r 's/",/"/' | sed 's/"//g' | sed 's/[[:space:]]*version:[[:space:]]*//1')" >> $GITHUB_ENV
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install vsce
run: npm install --global @vscode/vsce
- name: Build
run: yarn vsce-packge
- name: Create pkg dist dir
run: mkdir pkg-dist
- name: Move
run: mv keil-vscode-assistant-*.vsix pkg-dist/
- uses: actions/upload-artifact@v3
with:
name: build-result
path: |
pkg-dist
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{env.RELEASE_VERSION}}
draft: true
prerelease: false
append_body: true
files: |
pkg-dist/keil-vscode-assistant-${{ env.VERSION }}.vsix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}