-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
126 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,21 @@ | ||
name: Check library API binary compatibility | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check-api-compatibility: | ||
name: Check API compatibility | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
- name: Set up a specific Java version | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" # OR adopt OR microsoft OR... | ||
java-version: "17" | ||
- name: Run the check | ||
run: ./gradlew apiCheck |
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: Generate publication | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
generate-publication: | ||
name: Generate library publication | ||
# Should be macOS to be able to create iOS variants as well | ||
runs-on: macos-latest | ||
env: | ||
# For information about signing.* properties, | ||
# see comments on signing { ... } block in the library build file | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_KEY_CONTENT_BASE64: ${{ secrets.SIGNING_KEY_CONTENT_BASE64 }} | ||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
- name: Set up a specific Java version | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" # OR adopt OR microsoft OR... | ||
java-version: "17" | ||
- name: Decode the private GPG key file stored in GitHub secrets | ||
run: echo $SIGNING_KEY_CONTENT_BASE64 | base64 -d > private-key.gpg | ||
- name: Generate publication | ||
run: > | ||
./gradlew publishAllPublicationsToCustomLocalRepository | ||
-Psigning.secretKeyRingFile="../private-key.gpg" | ||
-Psigning.password="$SIGNING_PASSWORD" | ||
-Psigning.keyId="$SIGNING_KEY_ID" | ||
--stacktrace | ||
- name: Store the publication at the bottom of the workflow summary page | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: resultPublication | ||
path: | | ||
library/build/local-repository/ |
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,64 @@ | ||
name: Release a new version in maven repositories | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.*" | ||
|
||
jobs: | ||
release-version: | ||
name: Release library version | ||
# Should be macOS to be able to create iOS variants as well | ||
runs-on: macos-latest | ||
env: | ||
# For information about signing.* properties, | ||
# see comments on signing { ... } block in the library build file | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_KEY_CONTENT_BASE64: ${{ secrets.SIGNING_KEY_CONTENT_BASE64 }} | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
- name: Set up a specific Java version | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" # OR adopt OR microsoft OR... | ||
java-version: "17" | ||
- name: Decode the private GPG key file stored in GitHub secrets | ||
run: echo $SIGNING_KEY_CONTENT_BASE64 | base64 -d > private-key.gpg | ||
- name: Release to local repository | ||
id: release-local | ||
run: > | ||
./gradlew publishAllPublicationsToCustomLocalRepository | ||
-Psigning.secretKeyRingFile="../private-key.gpg" | ||
-Psigning.password="$SIGNING_PASSWORD" | ||
-Psigning.keyId="$SIGNING_KEY_ID" | ||
--stacktrace | ||
- name: Release to GitHub Packages | ||
if: always() && steps.release-local.outcome == 'success' | ||
run: > | ||
./gradlew publishAllPublicationsToGitHubPackagesRepository | ||
-Psigning.secretKeyRingFile="../private-key.gpg" | ||
-Psigning.password="$SIGNING_PASSWORD" | ||
-Psigning.keyId="$SIGNING_KEY_ID" | ||
--stacktrace | ||
- name: Release to Maven Central | ||
if: always() && steps.release-local.outcome == 'success' | ||
run: > | ||
./gradlew publishAllPublicationsToMavenCentralRepository | ||
-Psigning.secretKeyRingFile="../private-key.gpg" | ||
-Psigning.password="$SIGNING_PASSWORD" | ||
-Psigning.keyId="$SIGNING_KEY_ID" | ||
--stacktrace | ||
- name: Store the publication at the bottom of the workflow summary page | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: resultPublication | ||
path: | | ||
library/build/local-repository/ |