Build release #32
Workflow file for this run
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
name: Build release | |
permissions: | |
contents: write | |
on: | |
push: | |
tags-ignore: | |
- '*-alpha.*' | |
- '*-beta.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
with: | |
cmdline-tools-version: 11076708 # Android 13 | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Generate a changelog | |
uses: orhun/git-cliff-action@main | |
id: git-cliff | |
with: | |
config: cliff.toml | |
args: --latest --no-exec --github-repo ${{ github.repository }} | |
env: | |
OUTPUT: CHANGES.md | |
- name: Replace build.gradle versions to current tag | |
run: | | |
export PYTHONPATH="$(pwd)/scripts" | |
python scripts/replace-gradle-version.py ${{ github.ref_name }} | |
- name: Build libraries | |
run: ./gradlew build | |
- name: Publish to maven central | |
run: ./gradlew publishAndReleaseToMavenCentral | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }} | |
- uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ github.ref_name }} | |
artifacts: 'core/build/libs/*.jar,core/build/outputs/aar/*.aar,spring-boot/build/libs/spring-boot-*.jar' | |
bodyFile: 'CHANGES.md' |