Skip to content

Commit

Permalink
修正workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SugarMGP committed Jan 30, 2024
1 parent 721d0e3 commit e22bf91
Showing 1 changed file with 17 additions and 39 deletions.
56 changes: 17 additions & 39 deletions .github/workflows/workflow_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,38 @@

name: EOK Snapshot Build

on:
push:
branches:
- '1.12.2'
- '1.16'
pull_request:
branches:
- '1.12.2'
- '1.16'
workflow_dispatch:
on: [ push ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Clone CuckooLib repository
uses: actions/checkout@v2
with:
repository: zi-jing/CuckooLib
ref: 1.12
path: CuckooLib-1.12
- name: Clone EOK repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: EOK-1.12

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: burrunan/gradle-cache-action@v1
name: Cache .gradle
with:
# If you have multiple jobs, use distinct job-id in in case you want to split caches
# For instance, jobs with different JDK versions can't share caches
# RUNNER_OS is added to job-id automatically
job-id: eok
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
cache: 'gradle'

- name: Copy gradle.properties
run: cp ./EOK-1.12/.github/gradle.properties ./EOK-1.12/
#- uses: axel-op/googlejavaformat-action@v3
# with:
# args: "--skip-sorting-imports --replace"

- name: Grant execute permission for gradlew
run: chmod +x ./CuckooLib-1.12/gradlew && chmod +x ./EOK-1.12/gradlew
run: chmod +x ./EOK-1.12/gradlew

- name: CI Setup
run: cd ./EOK-1.12/ && ./gradlew setupCIWorkspace

- name: Build
run: cd ./EOK-1.12/ && ./gradlew build
- uses: actions/upload-artifact@v2

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: EOK snapshot
name: EOK Snapshot
path: ./EOK-1.12/build/libs
- uses: actions/upload-artifact@v2
with:
name: CuckooLib snapshot for EOK
path: ./CuckooLib-1.12/build/libs

0 comments on commit e22bf91

Please sign in to comment.