Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 7 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,29 @@ on:
- 'v*'

jobs:
checks:
uses: ./.github/workflows/test.yml

publish:
needs: checks

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The published VSIX is rebuilt differently from the one the checks tested. After needs: checks, the publish job builds again with JDK 20 (checks use 21), npm install instead of npm ci, and vsce package --no-dependencies instead of vsce package. So the shipped artifact isn't the one that passed: a lockfile drift, a JDK difference or a dependency-bundling difference would only show up in the release.

Suggest either aligning the steps (same JDK, npm ci, same vsce flags), or uploading the VSIX from the checks job as an artifact and publishing exactly that file.

(As the PR description says, requiring Checks on main is still a repo-settings step. See also the skipped-job note on #138, which affects that required check.)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 00fd1f4: checks upload the validated VSIX, and both marketplaces publish that exact downloaded file without rebuilding. Workflow/artifact checks, packaged runtime checks, and extension installation passed.

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
- name: Download checked extension
uses: actions/download-artifact@v4
with:
java-version: 21
distribution: temurin
name: liquid-java-vsix

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Build Server JAR
working-directory: ./server
run: |
mvn -B -ntp clean package -DskipTests
mkdir -p ../client/server
cp target/language-server-liquidjava.jar ../client/server/

- name: Install dependencies and build
working-directory: ./client
run: |
npm install
npm run package

- name: Install vsce
run: npm install -g @vscode/vsce

- name: Package extension
working-directory: ./client
run: vsce package --no-dependencies --out liquid-java.vsix

- name: Publish to VS Code Marketplace
working-directory: ./client
run: vsce publish --packagePath liquid-java.vsix -p ${{ secrets.VSCE_TOKEN }}

- name: Publish to Open VSX Marketplace
working-directory: ./client
run: npx ovsx publish liquid-java.vsix --pat ${{ secrets.OVSX_TOKEN }}
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,10 @@ jobs:
unzip -Z1 liquid-java.vsix > /tmp/liquid-java-vsix-files.txt
grep -Fx 'extension/dist/server/language-server-liquidjava.jar' /tmp/liquid-java-vsix-files.txt
grep -Fx 'extension/media/webview.js' /tmp/liquid-java-vsix-files.txt

- name: Upload checked extension
uses: actions/upload-artifact@v4
with:
name: liquid-java-vsix
path: client/liquid-java.vsix
if-no-files-found: error
Loading