102 lines
3.4 KiB
YAML
102 lines
3.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags: [v*.*.*]
|
|
|
|
jobs:
|
|
build-natives:
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
include:
|
|
- variant: macos-aarch64-metal
|
|
renderer: metal
|
|
preset: macos-metal
|
|
runner: macos-latest # aarch64
|
|
- variant: linux-amd64-opengl
|
|
renderer: opengl
|
|
preset: linux-opengl
|
|
runner: ubuntu-latest # amd64
|
|
- variant: windows-amd64-opengl
|
|
renderer: opengl
|
|
preset: windows-opengl
|
|
runner: windows-latest # amd64
|
|
runs-on: ${{ matrix.runner }}
|
|
name: build-natives (${{ matrix.variant }})
|
|
steps:
|
|
- if: ${{ matrix.runner == 'windows-latest' }}
|
|
run: git config --global core.longpaths true
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
- uses: ./.github/actions/setup-cmake
|
|
- uses: ./.github/actions/setup-gradle
|
|
- run: |
|
|
./gradlew :lib:maplibre-native-bindings-jni:buildNative -PdesktopRenderer=${{ matrix.renderer }}
|
|
- uses: actions/upload-artifact@v5
|
|
with:
|
|
if-no-files-found: error
|
|
name: natives-${{ matrix.variant }}
|
|
path: |
|
|
./lib/maplibre-native-bindings-jni/build/lib/${{ matrix.preset }}/shared/*
|
|
|
|
publish-maven:
|
|
needs: [build-natives]
|
|
runs-on: macos-latest
|
|
environment:
|
|
name: maven-central-maplibre
|
|
url: https://central.sonatype.com/namespace/org.maplibre.compose
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- run: git fetch --tags --force # https://github.com/actions/checkout/issues/290
|
|
- uses: ./.github/actions/setup-gradle
|
|
- uses: actions/download-artifact@v6
|
|
with:
|
|
name: natives-macos-aarch64-metal
|
|
path: ./lib/maplibre-native-bindings-jni/build/copiedResources/MacosAarch64Metal/macos/aarch64/metal/
|
|
- uses: actions/download-artifact@v6
|
|
with:
|
|
name: natives-linux-amd64-opengl
|
|
path: ./lib/maplibre-native-bindings-jni/build/copiedResources/LinuxAmd64Opengl/linux/amd64/opengl/
|
|
- uses: actions/download-artifact@v6
|
|
with:
|
|
name: natives-windows-amd64-opengl
|
|
path: ./lib/maplibre-native-bindings-jni/build/copiedResources/WindowsAmd64Opengl/windows/amd64/opengl/
|
|
- run: |
|
|
./gradlew publishAndReleaseToMavenCentral -PconfigureForPublishing=true --no-configuration-cache
|
|
env:
|
|
ORG_GRADLE_PROJECT_mavenCentralUsername:
|
|
${{ secrets.MAVEN_CENTRAL_USERNAME }}
|
|
ORG_GRADLE_PROJECT_mavenCentralPassword:
|
|
${{ secrets.MAVEN_CENTRAL_PASSWORD }}
|
|
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword:
|
|
${{ secrets.GPG_PASSPHRASE }}
|
|
|
|
publish-pages:
|
|
needs:
|
|
- publish-maven
|
|
runs-on: macos-latest
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deploy-pages.outputs.page_url }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- run: git fetch --tags --force # https://github.com/actions/checkout/issues/290
|
|
- uses: ./.github/actions/setup-gradle
|
|
- run: ./gradlew generateDocs
|
|
- uses: actions/upload-pages-artifact@v4
|
|
with:
|
|
path: build/docs
|
|
- uses: actions/deploy-pages@v4
|
|
id: deploy-pages
|