Skip to content

Commit 37eb1a7

Browse files
committed
Publish to Github
1 parent eeeaf44 commit 37eb1a7

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build
2+
permissions:
3+
packages: write
4+
5+
on: [ push ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout sources
12+
uses: actions/checkout@v4
13+
- name: Setup Java
14+
uses: actions/setup-java@v4
15+
with:
16+
distribution: 'temurin'
17+
java-version: 17
18+
- name: Setup Gradle
19+
uses: gradle/actions/setup-gradle@v3
20+
- name: Build with Gradle
21+
run: ./gradlew :publishAllPublicationsToGitHubPackagesRepository
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ publishing {
129129
password = project.hasProperty('mavenPassword') ? project.property('mavenPassword') : System.getenv('MAVEN_PASSWORD')
130130
}
131131
}
132+
maven {
133+
name = "GitHubPackages"
134+
url = "https://maven.pkg.github.com/LuaLink/fast-reflection"
135+
credentials {
136+
username = System.getenv("GITHUB_ACTOR")
137+
password = System.getenv("GITHUB_TOKEN")
138+
}
139+
}
132140
}
133141
}
134142

0 commit comments

Comments
 (0)