change build.yml
Build and Release / build (push) Has been cancelled Details

This commit is contained in:
itqop 2025-11-02 01:38:14 +03:00
parent dac572eb23
commit 48ef6c9552
1 changed files with 5 additions and 5 deletions

View File

@ -14,10 +14,10 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install Java - name: Install dependencies
run: | run: |
apt-get update apt-get update
apt-get install -y default-jdk-headless apt-get install -y default-jdk-headless jq curl
- name: Set up JDK 21 - name: Set up JDK 21
uses: actions/setup-java@v4 uses: actions/setup-java@v4
@ -54,7 +54,7 @@ jobs:
TAG_NAME="v${{ steps.version.outputs.mod_version }}" TAG_NAME="v${{ steps.version.outputs.mod_version }}"
RELEASE_NAME="Release $TAG_NAME" RELEASE_NAME="Release $TAG_NAME"
RESPONSE=$(curl -X POST \ RESPONSE=$(curl -s -X POST \
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{\"tag_name\":\"$TAG_NAME\",\"name\":\"$RELEASE_NAME\",\"draft\":false,\"prerelease\":false}" \ -d "{\"tag_name\":\"$TAG_NAME\",\"name\":\"$RELEASE_NAME\",\"draft\":false,\"prerelease\":false}" \
@ -66,7 +66,7 @@ jobs:
- name: Upload JAR to Release - name: Upload JAR to Release
run: | run: |
curl -X POST \ curl -s -X POST \
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
-H "Content-Type: multipart/form-data" \ -H "Content-Type: multipart/form-data" \
-F "attachment=@${{ steps.jar.outputs.jar_path }}" \ -F "attachment=@${{ steps.jar.outputs.jar_path }}" \
@ -78,7 +78,7 @@ jobs:
JAR_PATH="${{ steps.jar.outputs.jar_path }}" JAR_PATH="${{ steps.jar.outputs.jar_path }}"
JAR_NAME="${{ steps.jar.outputs.jar_name }}" JAR_NAME="${{ steps.jar.outputs.jar_name }}"
curl -X PUT \ curl -s -X PUT \
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \ -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
-H "Content-Type: application/java-archive" \ -H "Content-Type: application/java-archive" \
--data-binary @"$JAR_PATH" \ --data-binary @"$JAR_PATH" \