Merge branch 'master' into dev #141
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
--- | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- dev | |
env: | |
JAVA_DISTRIBUTION: zulu | |
JAVA_VERSION: 17 | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: ${{ env.JAVA_DISTRIBUTION }} | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Prepare Gradle | |
uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc | |
- name: fix permission error | |
run: chmod +x gradlew | |
- name: 🛠️ Build JS bundle | |
run: ./gradlew jsBrowserProductionWebpack | |
- name: 🫙 Build Jar File | |
run: ./gradlew packageJvmFatJar | |
- name: 🐧 Build Linux Executable | |
run: ./gradlew packageJvmLinuxApp | |
- name: Deploy 🚀 to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@3.7.1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: github-pages | |
FOLDER: build/dist/js/productionExecutable | |
CLEAN: true | |
- name: Upload JS | |
uses: actions/upload-artifact@v4 | |
with: | |
name: JS Bundle | |
path: "build/dist/js/productionExecutable" | |
- name: Upload Jar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Jar Files | |
path: "build/libs" | |
- name: Upload Linux | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Linux Executable | |
path: "build/platforms" | |
- name: Upload S3 | |
- uses: actions/checkout@master | |
- uses: shallwefootball/s3-upload-action@master | |
with: | |
aws_key_id: ${{secrets.AWS_ACCES_KEY_ID}} | |
aws_secret_access_key: ${{ secrets.AWS_ACCESS_KEY_SECRET}} | |
aws_bucket: ${{ env.AWS_BUCKET_NAME }} | |
source_dir: 'build/platforms' | |
- name: Upload S3 again | |
- uses: actions/checkout@master | |
- uses: shallwefootball/s3-upload-action@master | |
with: | |
aws_key_id: ${{secrets.AWS_ACCES_KEY_ID}} | |
aws_secret_access_key: ${{ secrets.AWS_ACCESS_KEY_SECRET}} | |
aws_bucket: ${{ env.AWS_BUCKET_NAME }} | |
source_dir: 'build/libs' | |