File tree Expand file tree Collapse file tree 1 file changed +31
-4
lines changed
Expand file tree Collapse file tree 1 file changed +31
-4
lines changed Original file line number Diff line number Diff line change 1- name : Java CI
1+ name : Push compiled jar to GitHub releases
22
33on : [push]
44
55jobs :
66 build :
7-
87 runs-on : ubuntu-latest
9-
108 steps :
11- - uses : actions/checkout@v1
9+ - uses : actions/checkout@v2
1210 - name : Set up JDK 1.8
1311 uses : actions/setup-java@v1
1412 with :
1513 java-version : 1.8
1614 - name : Build with Gradle
1715 run : ./gradlew build
16+ - name : Artifact
17+ uses : actions/upload-artifact@v1
18+ with :
19+ name : PlayerParticles-*.*-PGM.jar
20+ path : build/libs/PlayerParticles-*.*-PGM.jar
21+ - name : Move generated jar file
22+ run : mv build/libs/PlayerParticles-*.*-PGM.jar PlayerParticles-*.*-PGM.jar
23+ - name : Create Release
24+ id : create_release
25+ if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
26+ uses : actions/create-release@v1
27+ env :
28+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ with :
30+ tag_name : PlayerParticles-PGM-${{github.sha}}
31+ release_name : Release ${{github.sha}}
32+ draft : false
33+ prerelease : false
34+ - name : Upload Release Asset
35+ id : upload-release-asset
36+ if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
37+ uses : actions/upload-release-asset@v1
38+ env :
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+ with :
41+ upload_url : ${{ steps.create_release.outputs.upload_url }}
42+ asset_path : ./PlayerParticles-*.*-PGM.jar
43+ asset_name : PlayerParticles-*.*-PGM.jar
44+ asset_content_type : application/java-archive
You can’t perform that action at this time.
0 commit comments