Skip to content

Commit a331fac

Browse files
committed
✨ Feat: Update workflow to include release action.
- Remove unnecessary comments and setup-gradle action - Add release action for tagged commits - Configure release action to publish JAR files
1 parent 337d22d commit a331fac

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

.github/workflows/gradle.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@ name: Java CI with Gradle
22

33
on:
44
push:
5-
branches: [ "main" ]
65
pull_request:
7-
branches: [ "main" ]
86

97
jobs:
108
build:
11-
12-
runs-on: ubuntu-latest
139
permissions:
14-
contents: read
10+
contents: write
11+
discussions: write
12+
runs-on: ubuntu-latest
1513

1614
steps:
17-
- uses: actions/checkout@v4
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
1818
- name: Set up JDK 21
19-
uses: actions/setup-java@v4
19+
- uses: actions/setup-java@v4
2020
with:
2121
java-version: '21'
2222
distribution: 'temurin'
2323

24-
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
25-
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
26-
- name: Setup Gradle
27-
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
28-
2924
- name: Build with Gradle Wrapper
3025
run: chmod +x ./gradlew && ./gradlew build
31-
26+
27+
- name: Release
28+
uses: softprops/action-gh-release@v2
29+
if: startsWith(github.ref, 'refs/tags/')
30+
with:
31+
files: build/libs/fifu-*.jar

0 commit comments

Comments
 (0)