-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add a workflow to publish snapshot
- Loading branch information
1 parent
ab80272
commit 3f571f3
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish a snapshot package to Maven Central | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
- name: Setup git config (for patch command) | ||
run: | | ||
git config --global user.name "GitHub Actions Bot" | ||
git config --global user.email "<>" | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Publish package | ||
run: ./gradlew publish | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
GPG_KEY: ${{ secrets.GPG_KEY }} | ||
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | ||
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} |