Skip to content

Commit 569a772

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

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
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

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
group = 'gg.launchblock'
77
version = '1.0-PREVIEW'
88

9-
archivesBaseName = 'java-sdk'
9+
archivesBaseName = 'sdk-java'
1010

1111
java {
1212
toolchain {
@@ -36,10 +36,10 @@ publishing {
3636
repositories {
3737
maven {
3838
name = "GitHubPackages"
39-
url = uri("https://maven.pkg.github.com/LaunchBlockMC/java-sdk")
39+
url = uri("https://maven.pkg.github.com/LaunchBlockMC/sdk-java")
4040
credentials {
41-
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
42-
password = project.findProperty("gpr.token") ?: System.getenv("GITHUB_TOKEN")
41+
username = project.findProperty("gpr.user") ?: "BillyDotWS"
42+
password = project.findProperty("gpr.token") ?: System.getenv("PUBLISHING_TOKEN")
4343
}
4444
}
4545
}

gradle/wrapper/gradle-wrapper.jar

42.4 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)