-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (58 loc) · 1.67 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Plugin Build
on:
push:
branches:
- master
jobs:
build:
#奇怪的问题——ubuntu就是构建不了
#runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Cache Gradle Packages
uses: actions/cache@v3
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
- name: Make Gradle Wrapper Executable
run: chmod +x ./gradlew
- name: Build
id: build_1
run: ./gradlew clean build
- name: Build (retry 1)
id: build_2
if: steps.build_1.outcome == 'failure'
run: ./gradlew clean build
- name: Build (retry 2)
id: build_3
if: steps.build_2.outcome == 'failure'
run: ./gradlew clean build
- name: Build (retry 3)
id: build_4
if: steps.build_3.outcome == 'failure'
run: ./gradlew clean build
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: Plugin Artifact
path: outs/
- name: Automatic Releases
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "FDUtilities 自动构建最新版本"
files: |
outs/*.*