Update base extension from yo code. Update tests to use vscode-test a… #18
This file contains hidden or 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: "Publish to VS Code Marketplace" | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
cd: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout to branch | |
uses: actions/checkout@v4 | |
- name: Setup node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: "Bump version" | |
uses: 'phips28/gh-action-bump-version@master' | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} | |
with: | |
minor-wording: 'MINOR' | |
major-wording: 'MAJOR' | |
patch-wording: 'PATCH,FIX' | |
rc-wording: 'RELEASE' | |
- name: Install packages | |
run: npm ci | |
- name: Calculate version | |
id: calculateVersion | |
run: | | |
APP_VERSION=`cat package.json | jq ".version" -M | sed 's/\"//g'` | |
echo "AppVersion=$APP_VERSION" >> $GITHUB_OUTPUT | |
echo "app version = v$APP_VERSION" | |
- name: Compile | |
run: npm run build | |
- name: Build VSIX package | |
run: npm run package -- -o vscode-string-manipulation.v${{ steps.calculateVersion.outputs.AppVersion }}.vsix | |
- name: Publish extension package | |
env: | |
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} | |
run: npm run vsce -- publish -p $VSCE_TOKEN | |
- uses: actions/upload-artifact@v4 | |
name: Upload artifact | |
with: | |
name: vscode-string-manipulation.v${{ steps.calculateVersion.outputs.AppVersion }}.vsix | |
path: vscode-string-manipulation.v${{ steps.calculateVersion.outputs.AppVersion }}.vsix |