Skip to content

Commit e2f9c5a

Browse files
committed
[LB=20] Fix permission issue running gradle command
1 parent 6dcfd03 commit e2f9c5a

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.github/workflows/release.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 🛠️ Publish to GitHub Packages
22

33
on:
44
release:
5-
types: [ published ] # Trigger workflow on release publish event
5+
types: [published]
66

77
jobs:
88
deploy:
@@ -26,24 +26,28 @@ jobs:
2626
with:
2727
cache-read-only: false
2828

29-
# Step 4: Set version based on the release tag
29+
# Step 4: Grant execute permissions to gradlew
30+
- name: Grant execute permissions to gradlew
31+
run: chmod +x ./gradlew
32+
33+
# Step 5: Set version based on the release tag
3034
- name: Set version based on release tag
3135
run: echo VERSION=$(echo "${GITHUB_REF}" | sed 's/refs\/tags\///') >> $GITHUB_ENV
3236

33-
# Step 5: Build the project using Gradle
37+
# Step 6: Build the project using Gradle
3438
- name: Build with Gradle
3539
run: ./gradlew build
3640

37-
# Step 6: Publish the project to GitHub Packages
41+
# Step 7: Publish the project to GitHub Packages
3842
- name: Publish to GitHub Packages
3943
run: ./gradlew publish -Pversion=$VERSION
4044
env:
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4246

43-
# Step 7: Send notification to Discord
47+
# Step 8: Send notification to Discord
4448
- name: Send notification to Discord
4549
uses: SethCohen/[email protected]
4650
with:
4751
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
4852
color: "391879"
49-
username: "Java SDK"
53+
username: "Java SDK"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.gradle
22
build/
3-
/gradle/wrapper/gradle-wrapper.jar
3+
!gradle/wrapper/gradle-wrapper.jar
44
!**/src/main/**/build/
55
!**/src/test/**/build/
66

gradle/wrapper/gradle-wrapper.jar

42.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)