build: 测试构建 v7

This commit is contained in:
叁玖领域 2025-09-21 15:39:59 +08:00
parent 4b91763439
commit a966e7c2f5

View File

@ -29,11 +29,15 @@ jobs:
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew clean build run: ./gradlew clean build
- name: Upload build artifacts - name: Upload each jar separately
uses: actions/upload-artifact@v4 run: |
with: for file in $(find . -name "*.jar" -path "*/build/libs/*"); do
name: my-build echo "Uploading $file"
path: '**/build/libs/*.jar' artifact_name=$(basename "$file" .jar)
gh release upload "${GITHUB_REF_NAME}" "$file" --repo "${GITHUB_REPOSITORY}" --clobber
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release: release:
needs: build needs: build
@ -57,9 +61,11 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact to Release - name: Upload jars to Release separately
uses: softprops/action-gh-release@v1 run: |
with: for file in ./build-artifacts/**/*.jar; do
files: ./build-artifacts/**/*.jar echo "Uploading $file"
gh release upload "${GITHUB_REF_NAME}" "$file" --repo "${GITHUB_REPOSITORY}" --clobber
done
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}