Skip to content

Commit

Permalink
ci: Enable publishing to the GPR
Browse files Browse the repository at this point in the history
  • Loading branch information
impleri committed Nov 26, 2022
1 parent 11f7aa9 commit f4a0c9d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
arguments: build publish
- name: Remove Extra JARs
run: rm -f {fabric,forge}/build/libs/*{sources,dev,shadow}*.jar
- name: Move Fabric JARs
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
path: build/libs
- uses: Kir-Antipov/[email protected]
with:
github-token: ${{ secrets.HUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-generate-changelog: true
files: "build/libs/*.jar"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
run: |
git add version.properties
git commit -m "Version bump"
git push origin main --follow-tags --force
git push
10 changes: 8 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,14 @@ publishing {
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/impleri/player-skills")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
10 changes: 8 additions & 2 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@ publishing {
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/impleri/player-skills")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

0 comments on commit f4a0c9d

Please sign in to comment.