Skip to content

Commit

Permalink
GitHubPackages
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Jan 30, 2025
1 parent c4f8a8b commit 7ba331e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Publish package
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,13 @@ publishing {
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/TexBlock/FoxifiedNetworking"
credentials {
username = 'TexBlock'
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
loom.platform = neoforge

# Mod properties
mod_version = 0.1.0-alpha1
mod_version = 0.1.0-alpha2
maven_group = me.textrue.foxified_networking
archives_name = FoxifiedNetworkingAPI

Expand Down

0 comments on commit 7ba331e

Please sign in to comment.