From 2c2c7668b704d1b25c74d40a34c570eebb5b816e Mon Sep 17 00:00:00 2001 From: xyz8848 Date: Sat, 28 May 2022 17:19:28 +0800 Subject: [PATCH] Create build.yml --- .github/workflow/build.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflow/build.yml diff --git a/.github/workflow/build.yml b/.github/workflow/build.yml new file mode 100644 index 0000000..36a863f --- /dev/null +++ b/.github/workflow/build.yml @@ -0,0 +1,35 @@ +name: build + +on: + - push + jobs: + build: + runs-on: windows-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Java setup + uses: actions/setup-java@v2 + with: + distribution: "zulu" + java-version: 8 + cache: "gradle" + + - name: Set outputs + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: Build + run: gradlew.bat + + - name: Rename build artifacts + run: mv build/libs/FDPClient-*.jar build/libs/FDPClient-${{ steps.vars.outputs.sha_short }}.jar + + - name: Upload build artifacts + uses: actions/upload-artifact@v2 + with: + name: FDPClient + path: build/libs/FDPClient-${{ steps.vars.outputs.sha_short }}.jar \ No newline at end of file