changelog/ver #21
Workflow file for this run
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: Create Github Release | |
on: | |
push: | |
tags: | |
- 'v*' # Run when a version tag (e.g., v1.0.0) is pushed | |
jobs: | |
test: | |
if: github.ref_type == 'tag' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [20.x] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- run: npm ci | |
- run: npm run compile --if-present | |
- run: npm test | |
build: | |
needs: test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@master | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run vsce:package | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: "lpc-*.vsix" | |
- name: Create Release | |
id: create_release | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: "lpc-*.vsix" | |
# bodyFile: "CHANGELOG.md" | |
prerelease: false | |
generateReleaseNotes: true | |
- name: Publish to Visual Studio Marketplace | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | |
registryUrl: https://marketplace.visualstudio.com |