Skip to content

Commit

Permalink
Add Release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Oct 29, 2023
1 parent 6d5c4e6 commit 586f0b1
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: release
on:
workflow_dispatch:
inputs:
PACKAGE:
description: 'Package name'
required: true
jobs:
releaseSonatype:
environment: SonatypeAccess
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ndk:
- "26.1.10909125"
- "25.2.9519653"
libraryType:
- "shared"
- "static"

steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- uses: android-actions/setup-android@v3
- run: sdkmanager "ndk;${{ matrix.ndk }}"
- run: pip3 install --user ninja meson

- run: ./gradlew ${{ github.event.inputs.PACKAGE }}:build -PndkPath=${{ env.ANDROID_SDK_ROOT }}/ndk/${{ matrix.ndk }} -PlibraryType=${{ matrix.libraryType }}

- run: ./gradlew ${{ github.event.inputs.PACKAGE }}:publishToSonatype closeSonatypeStagingRepository -PndkPath=${{ env.ANDROID_SDK_ROOT }}/ndk/${{ matrix.ndk }} -PlibraryType=${{ matrix.libraryType }}
with:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASS: ${{ secrets.SIGNING_PASS }}

- uses: actions/upload-artifact@v3
with:
name: "${{ github.event.inputs.PACKAGE }}-${{ github.event.inputs.NDK }}-${{ github.event.inputs.LIBRARY_TYPE }}-logs"
path: "${{ github.event.inputs.PACKAGE }}/build/port/logs"
if-no-files-found: error

0 comments on commit 586f0b1

Please sign in to comment.