Skip to content

Update build.yml

Update build.yml #25

Workflow file for this run

name: Plugin Build
on:
push:
branches:
- master
jobs:
build:
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@v3
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/*.*