Merge pull request #142 from otymko/build/update-dependency #190
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: Java CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: windows-latest | |
name: Build app image | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Install python lib | |
run: pip install requests | |
- name: Download BSL LS | |
run: | | |
import requests | |
import os | |
import zipfile | |
import shutil | |
from urllib.request import urlretrieve | |
def getUrlDownloadBSL(): | |
url = "" | |
r = requests.get( | |
"https://api.github.com/repos/1c-syntax/bsl-language-server/releases/latest") | |
json = r.json() | |
for asset in json["assets"]: | |
if asset["name"] == "bsl-language-server_win.zip": | |
url = asset["browser_download_url"] | |
break | |
return url | |
bsl_name = "bsl-language-server" | |
dirName = os.path.join(os.getcwd(), "build", "libs") | |
url = getUrlDownloadBSL() | |
tmpfile, headers = urlretrieve(url) | |
zip = zipfile.ZipFile(tmpfile) | |
zip.extractall() | |
shutil.move(os.path.join(os.getcwd(), bsl_name), os.path.join(dirName, bsl_name)) | |
shell: python | |
- name: Build msi | |
run: ./gradlew jpackage | |
- uses: actions/upload-artifact@master | |
with: | |
name: phoenixbsl.msi | |
path: | | |
./phoenixbsl-*.msi | |
- uses: actions/upload-artifact@master | |
with: | |
name: phoenixbsl.jar | |
path: | | |
./build/libs/phoenix*.jar |