javac-upload #14
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: javac-upload | |
on: | |
schedule: | |
- cron: '0 */8 * * *' | |
workflow_dispatch: | |
jobs: | |
build-javac-support: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'eclipse-jdtls/eclipse-jdt-core-incubator' | |
ref: 'dom-with-javac' | |
path: eclipse-jdt-core-incubator | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'eclipse-jdtls/eclipse.jdt.ls' | |
path: eclipse.jdt.ls | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'redhat-developer/vscode-java' | |
path: vscode-java | |
- name: Set Up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '22' | |
distribution: 'adopt' | |
cache: 'maven' | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5 | |
with: | |
maven-version: 3.9.6 | |
- name: Build JDT Core / Javac | |
run: | | |
ls -ll | |
cd eclipse-jdt-core-incubator | |
echo "INCUBATOR_SHORT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
echo "INCUBATOR_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
mvn -pl '!org.eclipse.jdt.core.tests.builder,!org.eclipse.jdt.core.tests.compiler,!org.eclipse.jdt.core.tests.javac,!org.eclipse.jdt.core.tests.model,!org.eclipse.jdt.core.tests.performance,!org.eclipse.jdt.compiler.tool.tests,!org.eclipse.jdt.compiler.apt.tests,!org.eclipse.jdt.apt.ui,!org.eclipse.jdt.apt.tests,!org.eclipse.jdt.apt.pluggable.tests' install -DskipTests | |
cd .. | |
- name: Apply JDT-LS changes | |
run: | | |
cd eclipse.jdt.ls | |
gh pr checkout https://github.com/eclipse-jdtls/eclipse.jdt.ls/pull/3123 | |
git rebase master | |
cd .. | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Apply VS Code Java changes | |
run: | | |
cd vscode-java | |
gh pr checkout https://github.com/redhat-developer/vscode-java/pull/3558 | |
git rebase master | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Set Up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install NodeJS dependencies | |
run: npm install -g typescript "@vscode/vsce" | |
- name: Install vscode-java dependencies | |
run: | | |
pwd | |
cd vscode-java | |
npm ci | |
- name: Build JDT-LS | |
run: | | |
pwd | |
cd vscode-java | |
rm -rf ./out | |
npm run build-server | |
echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV | |
- name: Prepare Lombok Support | |
run: | | |
pwd | |
cd vscode-java | |
npx gulp download_lombok | |
- name: Package vscode-java | |
run: | | |
pwd | |
cd vscode-java | |
npx gulp prepare_pre_release | |
vsce package --pre-release -o vscode-javac-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix | |
ls -lash *.vsix | |
echo "BUILD_DATE=$(date +'%d/%m/%Y')" >> $GITHUB_ENV | |
- name: Publish to GH Release Tab | |
uses: "marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0" | |
with: | |
repo_token: "${{secrets.GITHUB_TOKEN}}" | |
automatic_release_tag: "javac-prototype" | |
prerelease: true | |
title: "Prototype build with Javac support (${{env.BUILD_DATE}})" | |
files: | | |
vscode-java/*.vsix | |
- name: Update release description | |
run: | | |
cd vscode-java | |
echo -e 'Enable javac-based compilation in vscode-java with `"java.jdt.ls.javac.enabled":"on"` in your VS Code settings.\nRequires running the extension with JDK 22 (set `java.jdt.ls.java.home`).\n\nBuilt from:\n\n - jdt.core.incubator: commit [${{env.INCUBATOR_SHORT_COMMIT}}](https://github.com/eclipse-jdtls/eclipse-jdt-core-incubator/commit/${{env.INCUBATOR_COMMIT}})\n - jdt.ls: https://github.com/eclipse-jdtls/eclipse-jdt.ls/pull/3123 rebased on master\n - vscode-java: https://github.com/redhat-developer/vscode-java/pull/3558 rebased on master' > notes.md | |
cat notes.md | |
gh -R fbricon/vscode-java release edit javac-prototype -F notes.md | |
env: | |
GH_TOKEN: ${{ github.token }} |