Build release #12
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: | |
workflow_dispatch: | |
# push: | |
# tags-ignore: | |
# - '*-alpha.*' | |
# - '*-beta.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- 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: Show current changelog | |
shell: bash | |
run: cat CHANGES.md | |
- name: Replace build.gradle versions to current tag | |
run: deno run --allow-run --allow-write --allow-read scripts/replace-gradle-version.js --version=${{ 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/core-jvm.*.jar,core/build/outputs/aar/*.aar,spring-boot/build/libs/spring-boot-*.jar' | |
bodyFile: 'CHANGES.md' |