-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new version publishing
- Loading branch information
Showing
3 changed files
with
56 additions
and
26 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 |
---|---|---|
|
@@ -3,35 +3,56 @@ | |
|
||
name: Java CI with Gradle | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt' | ||
architecture: x64 | ||
cache: gradle | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew distZip | ||
- name: Unzip | ||
run: unzip -o ./build/distributions/*.zip -d ./dist/ | ||
- name: Upload Zip | ||
uses: actions/[email protected] | ||
with: | ||
name: FakePlayer | ||
path: ./dist/ | ||
|
||
|
||
- uses: actions/checkout@v2 | ||
|
||
# Set up JDK | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt' | ||
architecture: x64 | ||
cache: gradle | ||
|
||
# Make gradlew executable | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
# Build | ||
- name: Build with Gradle | ||
run: ./gradlew distZip | ||
|
||
# Unzip because Actions only support folders as artifacts | ||
- name: Unzip | ||
run: unzip -o ./build/distributions/*.zip -d ./dist/ | ||
|
||
# Upload artifacts | ||
- name: Upload Zip | ||
uses: actions/[email protected] | ||
with: | ||
name: FakePlayer | ||
path: ./dist/ | ||
|
||
# Rename distribution for release | ||
- name: Rename distribution | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: mv ./build/distributions/*.zip ./build/distributions/FakePlayer-$(./gradlew -q getVersion).zip | ||
|
||
# Publish new version | ||
- name: Publish new version | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_REPOSITORY: ddf8196/FakePlayer | ||
with: | ||
body_path: ${{ github.workspace }}/release-notes.md | ||
files: ${{ github.workspace }}/build/distributions/*.zip |
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
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,5 @@ | ||
## 更新内容 | ||
* 支持1.18.30版本(协议版本503) | ||
|
||
## Change Log | ||
* Support 1.18.30 version (Protocol 503) |