forked from TabooLib/adyeshach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Adyeshach Build | ||
on: | ||
push: | ||
branches: | ||
- 2.0 | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v2 | ||
- name: cache gradle packages | ||
uses: actions/cache@v2 | ||
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.0 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- name: make gradle wrapper executable | ||
run: chmod +x ./gradlew | ||
# 第一次构建 | ||
- name: build | ||
id: build_1 | ||
run: ./gradlew build | ||
# 第二次构建 | ||
- name: build (retry 1) | ||
id: build_2 | ||
if: steps.build_1.outcome == 'failure' | ||
run: ./gradlew build | ||
# 第三次构建 | ||
- name: build (retry 2) | ||
id: build_3 | ||
if: steps.build_2.outcome == 'failure' | ||
run: ./gradlew build | ||
# 第四次构建 | ||
- name: build (retry 3) | ||
id: build_4 | ||
if: steps.build_3.outcome == 'failure' | ||
run: ./gradlew build | ||
- name: Set outputs | ||
id: short_sha | ||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: Publish Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: "plugin/build/libs/*.jar" | ||
body: | | ||
Commit ${{ steps.short_sha.outputs.sha_short }} | ||
This release is automatically compiled by GitHub Actions | ||
name: Adyeshach Automation Compile ${{ steps.short_sha.outputs.sha_short }} | ||
draft: false | ||
tag_name: commit-${{ steps.short_sha.outputs.sha_short }} | ||
generate_release_notes: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_KEY }} | ||
GITHUB_REPOSITORY: LangZongz/Adyeshach |