File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,15 @@ jobs:
2929 - name : Build with Gradle
3030 run : ./gradlew clean build
3131
32- - name : Upload build artifacts
33- uses : actions/upload-artifact@v4
34- with :
35- name : my-build
36- path : ' **/build/libs/*.jar'
32+ - name : Upload each jar separately
33+ run : |
34+ for file in $(find . -name "*.jar" -path "*/build/libs/*"); do
35+ echo "Uploading $file"
36+ artifact_name=$(basename "$file" .jar)
37+ gh release upload "${GITHUB_REF_NAME}" "$file" --repo "${GITHUB_REPOSITORY}" --clobber
38+ done
39+ env :
40+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3741
3842 release :
3943 needs : build
5761 env :
5862 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5963
60- - name : Upload artifact to Release
61- uses : softprops/action-gh-release@v1
62- with :
63- files : ./build-artifacts/**/*.jar
64+ - name : Upload jars to Release separately
65+ run : |
66+ for file in ./build-artifacts/**/*.jar; do
67+ echo "Uploading $file"
68+ gh release upload "${GITHUB_REF_NAME}" "$file" --repo "${GITHUB_REPOSITORY}" --clobber
69+ done
6470 env :
6571 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments