Update version to 1.0.2-alpha in build.gradle.kts and enhance release workflow in release.yml
All checks were successful
Build and Release / build (push) Successful in 2m4s
All checks were successful
Build and Release / build (push) Successful in 2m4s
This commit is contained in:
parent
2625155037
commit
35c3b1d4fc
@ -28,43 +28,66 @@ jobs:
|
||||
id: get_version
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create Release
|
||||
uses: actions/forgejo-release@v2
|
||||
with:
|
||||
direction: upload
|
||||
url: ${{ github.server_url }}
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
release-dir: build/libs
|
||||
release-notes: |
|
||||
## Release ${{ steps.get_version.outputs.VERSION }}
|
||||
- name: Find JAR file
|
||||
id: find_jar
|
||||
run: |
|
||||
JAR_FILE=$(find build/libs -name "*.jar" ! -name "*-sources.jar" ! -name "*-javadoc.jar" | head -1)
|
||||
echo "JAR_PATH=$JAR_FILE" >> $GITHUB_OUTPUT
|
||||
echo "JAR_NAME=$(basename $JAR_FILE)" >> $GITHUB_OUTPUT
|
||||
|
||||
### What's New
|
||||
- Feature 1
|
||||
- Feature 2
|
||||
- name: Create Draft Release
|
||||
run: |
|
||||
VERSION="${{ steps.get_version.outputs.VERSION }}"
|
||||
|
||||
### Bug Fixes
|
||||
- Fix 1
|
||||
- Fix 2
|
||||
RELEASE_BODY="## Release ${VERSION}
|
||||
|
||||
### Changes
|
||||
- Change 1
|
||||
- Change 2
|
||||
### What's New
|
||||
- Feature 1
|
||||
- Feature 2
|
||||
|
||||
### Breaking Changes
|
||||
- None
|
||||
### Bug Fixes
|
||||
- Fix 1
|
||||
- Fix 2
|
||||
|
||||
### Installation
|
||||
1. Download the JAR file from the assets below
|
||||
2. Place it in your server's `plugins` folder
|
||||
3. Restart the server
|
||||
### Changes
|
||||
- Change 1
|
||||
- Change 2
|
||||
|
||||
### Requirements
|
||||
- Minecraft Server with PaperMC: 1.21.11
|
||||
- Java: 21+
|
||||
### Breaking Changes
|
||||
- None
|
||||
|
||||
---
|
||||
**Full Changelog**: Compare with previous version
|
||||
tag: ${{ steps.get_version.outputs.VERSION }}
|
||||
title: Release ${{ steps.get_version.outputs.VERSION }}
|
||||
prerelease: false
|
||||
draft: true
|
||||
### Installation
|
||||
1. Download the JAR file from the assets below
|
||||
2. Place it in your server's \`plugins\` folder
|
||||
3. Restart the server
|
||||
|
||||
### Requirements
|
||||
- Minecraft Server with PaperMC: 1.21.11
|
||||
- Java: 21+"
|
||||
|
||||
# Create draft release
|
||||
RESPONSE=$(curl -s -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases" \
|
||||
-d "{
|
||||
\"tag_name\": \"${VERSION}\",
|
||||
\"name\": \"Release ${VERSION}\",
|
||||
\"body\": $(echo "$RELEASE_BODY" | jq -Rs .),
|
||||
\"draft\": true,
|
||||
\"prerelease\": false
|
||||
}")
|
||||
|
||||
RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id')
|
||||
echo "Created release with ID: $RELEASE_ID"
|
||||
echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload JAR to Release
|
||||
run: |
|
||||
curl -s -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Content-Type: application/java-archive" \
|
||||
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=${{ steps.find_jar.outputs.JAR_NAME }}" \
|
||||
--data-binary @"${{ steps.find_jar.outputs.JAR_PATH }}"
|
||||
|
||||
echo "Uploaded ${{ steps.find_jar.outputs.JAR_NAME }} to release"
|
||||
|
||||
@ -5,7 +5,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "com.rpserver"
|
||||
version = "1.0.0-alpha"
|
||||
version = "1.0.2-alpha"
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user