Skip to content

Commit

Permalink
Update v0.5.4
Browse files Browse the repository at this point in the history
Add new version publishing
  • Loading branch information
Jasonzyt committed Apr 22, 2022
1 parent 0ceff22 commit 3f1188a
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 26 deletions.
71 changes: 46 additions & 25 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group 'com.ddf.fakeplayer'
version '0.5.3-alpha'
version '0.5.4-alpha'

repositories {
maven {
Expand Down Expand Up @@ -102,6 +102,10 @@ static def replace(String input, String name, String value) {
return (input =~ /${regex}/).replaceAll(value)
}

task getVersion {
print version
}

task runGUI(type: JavaExec) {
classpath = run.classpath
main = run.main
Expand Down
5 changes: 5 additions & 0 deletions release-notes.md
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)

0 comments on commit 3f1188a

Please sign in to comment.