Skip to content

Commit 45ad8d5

Browse files
authored
Add release management
1 parent 64ad2d4 commit 45ad8d5

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

.github/workflows/gradle.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build with Gradle
1+
name: Build with Gradle (Semver Releases)
22

33
on: [push]
44

@@ -14,11 +14,31 @@ jobs:
1414
java-version: 1.8
1515

1616
- name: Build with Gradle
17-
run: |
18-
./gradlew build
17+
run: ./gradlew build
1918

2019
- name: Add Artifact
2120
uses: actions/upload-artifact@v2
2221
with:
2322
name: Package
24-
path: build/libs
23+
path: build/libs/*.jar
24+
25+
- name: Create Release
26+
uses: actions/create-release@v1
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
with:
30+
tag_name: ${{ github.ref }}
31+
release_name: Release ${{ github.ref }}
32+
draft: false
33+
prerelease: false
34+
35+
# - name: Upload Release Asset
36+
# id: upload-release-asset
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 }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
42+
# asset_path: ./my-artifact.zip
43+
# asset_name: my-artifact.zip
44+
# asset_content_type: application/zip

0 commit comments

Comments
 (0)