-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish snapshot on maven for testing the java-libkiwix
* Introduce publish_snapshot.yml for uploading the snapshot artifact on the mavenCentral. * We have added the `SNAPSHOT` env variable in publish_snapshot.yml and match it our code if found then it means this workflow triggered to publish the snapshot on maven so on behalf of this we have rectify our code.
- Loading branch information
1 parent
f561034
commit 4751ef1
Showing
4 changed files
with
68 additions
and
28 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,41 @@ | ||
name: Publish Snapshot to Maven | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags-ignore: | ||
- '*' | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
|
||
- name: Install dependencies | ||
run: bash ./install_deps.sh | ||
|
||
- name: Compile and prepare package | ||
run: | | ||
./gradlew buildHeaders build assemble androidSourcesJar | ||
- name: Publish Snapshot to MavenCentral | ||
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
SNAPSHOT: true |
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
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
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