Generate plugin archive for new release #7
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: Generate plugin archive for new release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
publishToMarketPlace: | ||
description: 'Publish to VS Code Marketplace ?' | ||
required: true | ||
type: choice | ||
options: | ||
- 'true' | ||
- 'false' | ||
default: 'false' | ||
publishToOVSX: | ||
description: 'Publish to OpenVSX Registry ?' | ||
required: true | ||
type: choice | ||
options: | ||
- 'true' | ||
- 'false' | ||
default: 'false' | ||
jobs: | ||
build-job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk | ||
architecture: x64 | ||
- name: Setup node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18 | ||
- name: Build RSP part using Maven | ||
working-directory: rsp | ||
run: mvn clean install -U -fae -e -B | ||
- name: Install NPM prerequisities | ||
working-directory: vscode | ||
run: | | ||
npm install -g typescript vsce | ||
- name: Build VSCode part using NPM | ||
working-directory: vscode | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Run NPM tests | ||
uses: GabrielBB/xvfb-action@f040be23a619e5ec34116f24098ad3626ceab681 #v1.4 | ||
with: | ||
working-directory: vscode | ||
run: npm run test | ||
- name: Cache Version | ||
working-directory: vscode | ||
run: | | ||
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV | ||
- name: Package vscode-server-connector | ||
working-directory: vscode | ||
run: | | ||
vsce package -o vscode-server-connector-${{ env.EXT_VERSION }}.vsix | ||
ls -lash *.vsix | ||
- name: Upload VSIX Artifacts | ||
working-directory: vscode | ||
uses: actions/upload-artifact@v4 | ||
Check failure on line 64 in .github/workflows/release.yml GitHub Actions / Generate plugin archive for new releaseInvalid workflow file
|
||
with: | ||
name: vscode-community-server-connector | ||
path: | | ||
vscode-community-server-connector-${{ env.EXT_VERSION }}.vsix | ||
if-no-files-found: error | ||
release-job: | ||
environment: ${{ (inputs.publishToMarketPlace == 'true' || inputs.publishToOVSX == 'true') && 'release' }} | ||
runs-on: ubuntu-latest | ||
needs: build-job | ||
steps: | ||
- name: Set Up NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
- name: Install dependencies | ||
run: | | ||
npm install -g typescript "@vscode/vsce" "ovsx" | ||
- name: Download VSIX | ||
uses: actions/download-artifact@v4 | ||
- name: Publish to VS Code Marketplace | ||
if: ${{ inputs.publishToMarketPlace == 'true' }} | ||
run: | | ||
ls -la #debug | ||
for platformVsix in vscode-community-server-connector/*.vsix; do | ||
echo "Running command: vsce publish --skip-duplicate -p SOME_SECRET --packagePath ${platformVsix}" | ||
#vsce publish --skip-duplicate -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} --packagePath ${platformVsix} | ||
done | ||
- name: Publish to OpenVSX Registry | ||
if: ${{ inputs.publishToOVSX == 'true' }} | ||
run: | | ||
ls -la #debug | ||
for platformVsix in vscode-community-server-connector/*.vsix; do | ||
echo "Running command: ovsx publish --skip-duplicate -p SOME_SECRET --packagePath ${platformVsix}" | ||
#ovsx publish --skip-duplicate -p ${{ secrets.OVSX_MARKETPLACE_TOKEN }} --packagePath ${platformVsix} | ||
done |