Skip to content

Add needed env var #153

Add needed env var

Add needed env var #153

Workflow file for this run

name: Java CI with Gradle
on:
push:
branches: [develop]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Import GPG key
run: |
echo "$GPG_SIGNING_KEY_PW" | gpg --batch --import --yes --passphrase-fd 0 <(echo -n "$GPG_SIGNING_KEY_B64" | base64 --decode)
env:
GPG_SIGNING_KEY_B64: ${{ secrets.GPG_PRIVATE_KEY_B64 }}
GPG_SIGNING_KEY_PW: ${{ secrets.GPG_PASSPHRASE }}
- name: Setup GPG key information
run: |
mkdir -p ~/.gradle ~/.gnupg
echo "signing.gnupg.homeDir=/home/runner/.gnupg" >> ~/.gradle/gradle.properties
echo "signing.gnupg.executable=gpg" >> ~/.gradle/gradle.properties
echo "signing.gnupg.keyName=ABC48776" >> ~/.gradle/gradle.properties
echo "signing.gnupg.passphrase=${GPG_SIGNING_KEY_PW}" >> ~/.gradle/gradle.properties
env:
GPG_SIGNING_KEY_PW: ${{ secrets.GPG_PASSPHRASE }}
- name: Build package
run: ./gradlew clean build
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
RELEASE_GRADLE_PLUGIN_TOKEN: ${{ secrets.RELEASE_GRADLE_PLUGIN_TOKEN }}