Skip to content

Maven

Maven #21

Workflow file for this run

name: Maven
on:
workflow_dispatch:
inputs:
variants:
description: 'Variants to publish'
type: choice
options:
- 'all'
- 'apksign'
- 'apktransform'
- 'cmaker'
- 'jgit'
- 'publish'
- 'resopt'
- 'none'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Build with Gradle
run: |
variant="${{ github.event.inputs.variants }}"
if [ "$variant" = "all" ]; then
./gradlew publish
elif [ "$variant" = "none" ]; then
echo "No variants to publish"
else
./gradlew :$variant:publish
fi
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.maven_pgp_signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.maven_pgp_signingPassword }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.maven_ossrhUsername }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.maven_ossrhPassword }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}