Jesus christ #51
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: Build | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "21" | |
cache: "gradle" | |
- name: Validate Gradle wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Compile javascript | |
run: ./gradlew generateJavaScript --info | |
- name: Compile web assets | |
run: bash ./CompileEPK.sh | |
- name: Upload web files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: web | |
path: | | |
javascript/lang/ | |
javascript/index.html | |
javascript/classes.js | |
javascript/classes.js.map | |
javascript/favicon.ico | |
javascript/assets.epk | |
- name: Copy web files to _site/ | |
if: github.ref == 'refs/heads/main' | |
run: mkdir _site/ && cp --recursive --target-directory=_site/ | |
javascript/lang/ | |
javascript/index.html | |
javascript/classes.js | |
javascript/classes.js.map | |
javascript/favicon.ico | |
javascript/assets.epk | |
- name: Upload github-pages artifact | |
if: github.ref == 'refs/heads/main' | |
uses: actions/upload-pages-artifact@v3 | |
- name: Compile offline assets | |
run: bash CompileEPK.sh | |
- name: Make offline download | |
run: bash MakeOfflineDownload.sh | |
- name: Upload offline download | |
uses: actions/upload-artifact@v4 | |
with: | |
name: offline | |
path: javascript/EaglercraftX_1.8_Offline_en_US.html |