.github/workflows/publish-extension.yml #16
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
on: | |
workflow_dispatch: | |
inputs: | |
preRelease: | |
description: "Make this a pre-release ?" | |
required: true | |
type: boolean | |
default: true | |
marketplace: | |
description: "On which market place should we publish ?" | |
required: true | |
type: choice | |
default: 'both' | |
options: | |
- vscode | |
- openvsx | |
- both | |
jobs: | |
publish-extension: | |
runs-on: ubuntu-latest | |
if: ${{success() && (startsWith(github.ref, 'refs/tags/') || inputs.preRelease)}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Copy licences | |
run: | | |
cd client | |
cp ../LICENSE . && cp ../README.md . | |
- name: Pre publish phase | |
run: | | |
cd client | |
yarn run package | |
- name: Publish to Open VSX Registry | |
if: ${{inputs.marketplace == 'openvsx' || inputs.marketplace == 'both'}} | |
uses: HaaLeo/[email protected] | |
id: publishToOpenVSX | |
with: | |
pat: ${{ secrets.OVSX_PAT }} | |
packagePath: ./client/ | |
yarn: true | |
preRelease: ${{ inputs.preRelease }} | |
- name: Publish to Visual Studio Marketplace | |
if: ${{inputs.marketplace == 'vscode' || inputs.marketplace == 'both'}} | |
uses: HaaLeo/[email protected] | |
with: | |
pat: ${{ secrets.VSCE_PAT }} | |
packagePath: ./client/ | |
registryUrl: https://marketplace.visualstudio.com | |
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }} | |
yarn: true | |
preRelease: ${{ inputs.preRelease }} |