2019-12-17 20:03:31 +08:00
|
|
|
name: Java CI
|
|
|
|
|
2021-05-29 16:49:24 +08:00
|
|
|
on: [push, pull_request]
|
2019-12-17 20:03:31 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-11-24 12:54:48 +08:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-08 20:49:32 +08:00
|
|
|
- name: Set up JDK 11
|
2022-11-24 12:54:48 +08:00
|
|
|
uses: actions/setup-java@v3
|
2019-12-17 20:03:31 +08:00
|
|
|
with:
|
2021-09-08 20:49:32 +08:00
|
|
|
distribution: 'zulu'
|
|
|
|
java-version: '11'
|
2022-11-24 12:54:48 +08:00
|
|
|
java-package: 'jdk+fx'
|
2019-12-17 20:03:31 +08:00
|
|
|
- name: Build with Gradle
|
|
|
|
run: ./gradlew build
|
2022-08-28 16:59:03 +08:00
|
|
|
env:
|
|
|
|
MICROSOFT_AUTH_ID: ${{ secrets.MICROSOFT_AUTH_ID }}
|
|
|
|
MICROSOFT_AUTH_SECRET: ${{ secrets.MICROSOFT_AUTH_SECRET }}
|
|
|
|
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
|
2021-10-16 00:25:29 +08:00
|
|
|
- name: Get short SHA
|
|
|
|
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
2021-05-25 13:20:33 +08:00
|
|
|
- name: Upload Artifacts
|
2022-11-24 12:54:48 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-05-25 13:20:33 +08:00
|
|
|
with:
|
2021-10-16 00:25:29 +08:00
|
|
|
name: HMCL-${{ env.SHORT_SHA }}
|
2021-09-06 20:17:03 +08:00
|
|
|
path: HMCL/build/libs
|