Compress resolution to 1/4 to improve performance. Image quality equi… #19
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: [ pull_request, push ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
minecraft: [ 1.16.5, 1.17.1, 1.18.2, 1.19.2, 1.19.3, 1.19.4 ] | |
variation: [ normal, server, lifts ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
- name: Validate gradle wrapper | |
uses: gradle/wrapper-validation-action@main | |
- name: Setup JDK 17 | |
uses: actions/setup-java@main | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- name: Make gradle wrapper executable | |
run: chmod +x ./gradlew | |
- name: Build ${{ matrix.minecraft }} | |
run: ./gradlew build -PbuildVersion="${{ matrix.minecraft }}" -PpatreonApiKey="${{ secrets.PATREON_API_KEY }}" -Pvariation="${{ matrix.variation }}" --continue | |
- name: Capture release artifacts | |
uses: actions/upload-artifact@main | |
with: | |
name: Fabric and Forge ${{ matrix.variation }} | |
path: build/release/ | |
- name: Capture lib artifacts | |
if: ${{ matrix.variation == 'normal' || matrix.variation == 'server' }} | |
uses: actions/upload-artifact@main | |
with: | |
name: Libraries | |
path: build/libs/ | |
- name: Upload files to SFTP | |
env: | |
MY_KEY: ${{ secrets.FTP_HOST }} | |
if: ${{ env.MY_KEY != '' }} | |
uses: sand4rt/ftp-deployer@master | |
with: | |
sftp: true | |
host: ${{ secrets.FTP_HOST }} | |
port: 22 | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
remote_folder: ${{ secrets.FTP_PATH }} | |
local_folder: build/latest | |
exclude: '["latest.json"]' | |
- name: Upload version file to SFTP | |
env: | |
MY_KEY: ${{ secrets.FTP_HOST }} | |
if: ${{ env.MY_KEY != '' && matrix.minecraft == '1.16.5' }} | |
uses: sand4rt/ftp-deployer@master | |
with: | |
sftp: true | |
host: ${{ secrets.FTP_HOST }} | |
port: 22 | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
remote_folder: ${{ secrets.FTP_PATH }} | |
local_folder: build/latest | |
include: '["latest.json"]' | |
server: | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
minecraft: [ 1.16.5, 1.17.1, 1.18.2, 1.19.2, 1.19.3, 1.19.4 ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
- name: Validate gradle wrapper | |
uses: gradle/wrapper-validation-action@main | |
- name: Setup JDK 17 | |
uses: actions/setup-java@main | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- name: Make gradle wrapper executable | |
run: chmod +x ./gradlew | |
- name: Build ${{ matrix.minecraft }} | |
run: ./gradlew build -PbuildVersion="${{ matrix.minecraft }}" -PpatreonApiKey="${{ secrets.PATREON_API_KEY }}" -PtestServer="true" --continue | |
- name: Test ${{ matrix.minecraft }} Server | |
run: ./gradlew testServer -PbuildVersion="${{ matrix.minecraft }}" --continue | |
crowdin: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
- name: Upload Translations to Crowdin | |
env: | |
MY_KEY: ${{ secrets.CROWDIN_API_KEY }} | |
if: ${{ env.MY_KEY != '' && github.ref == 'refs/heads/master' }} | |
uses: crowdin/github-action@master | |
with: | |
upload_sources: true | |
upload_translations: false | |
download_translations: false | |
push_translations: false | |
create_pull_request: false | |
project_id: '455212' | |
token: ${{ secrets.CROWDIN_API_KEY }} | |
config: 'crowdin.yml' |