Skip to content

ci: update GitHub Action #35

ci: update GitHub Action

ci: update GitHub Action #35

Workflow file for this run

name: Compile and Deploy Java API to Maven Central
on:
push:
branches:
- keyple-less-client
workflow_dispatch:
jobs:
java-publish:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Write gradle.properties
run: |
mkdir -p ~/.gradle
echo "ossrhUsername=${{ secrets.OSSRH_USERNAME }}" >> ~/.gradle/gradle.properties
echo "ossrhPassword=${{ secrets.OSSRH_API_TOKEN }}" >> ~/.gradle/gradle.properties
echo "signing.keyId=${{ secrets.OSSRH_GPG_KEY_ID }}" >> ~/.gradle/gradle.properties
echo "signing.password=${{ secrets.OSSRH_GPG_SECRET_PASSWORD }}" >> ~/.gradle/gradle.properties
echo "signing.secretKeyRingFile=/home/runner/.gradle/maven-central.gpg" >> ~/.gradle/gradle.properties
- name: Install GPG secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --pinentry-mode loopback --passphrase "${{ secrets.OSSRH_GPG_SECRET_PASSWORD }}" --export-secret-keys > ~/.gradle/maven-central.gpg
gpg --list-secret-keys --keyid-format LONG
- name: Update permissions
run: chmod +x ./gradlew ./.github/scripts/*.sh
- name: Check version
run: ./.github/scripts/check_version.sh
- name: Build and Publish
run: ./gradlew build test publish --info --stacktrace