ci: update of files from global .github repo (#231) #97
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: Release Extension to official Marketplace and Open VSX registry | |
on: | |
# It cannot run on release event as when release is created then version is not yet bumped in package.json | |
push: | |
branches: | |
- master | |
jobs: | |
release-open-vsx: | |
name: Release to Open VSX | |
# such a specific commit messages comes from if-nodejs-version-bump.yml workflow | |
if: startsWith(github.event.commits[0].message, 'chore(release):') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
- name: Install dependencies | |
run: npm ci | |
- name: Publish to Open VSX Registry | |
uses: HaaLeo/publish-vscode-extension@dfe4f6ad46624424fe24cb5bca79839183399045 # v1.4 https://github.com/HaaLeo/publish-vscode-extension/releases/tag/v1.4.0 | |
with: | |
pat: ${{ secrets.OPEN_VSX_TOKEN }} | |
release-vs-code-marketplace: | |
name: Release to VS Code Marketplace | |
# such a specific commit messages comes from if-nodejs-version-bump.yml workflow | |
if: startsWith(github.event.commits[0].message, 'chore(release):') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
- name: Install dependencies | |
run: npm ci | |
- name: Publish to Visual Studio Marketplace | |
uses: HaaLeo/publish-vscode-extension@dfe4f6ad46624424fe24cb5bca79839183399045 # v1.4 https://github.com/HaaLeo/publish-vscode-extension/releases/tag/v1.4.0 | |
with: | |
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | |
registryUrl: https://marketplace.visualstudio.com |