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