Skip to content

- chg: updated GitHub actions #29

- chg: updated GitHub actions

- chg: updated GitHub actions #29

name: Publish Locus API
on:
push:
tags:
- 'Locus_API_[0-9]+.[0-9]+.[0-9]+'
env:
ANDROID_SIGN_DEBUG: ${{ secrets.ANDROID_SIGN_DEBUG }}
ANDROID_SIGN_RELEASE: ${{ secrets.ANDROID_SIGN_RELEASE }}
jobs:
build:
name: Release API
runs-on: ubuntu-latest
# job steps
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
# Prepare source code
# https://github.com/marketplace/actions/checkout
- name: Clone repo
uses: actions/checkout@v2
# Base64 decodes and pipes the GPG key content into the secret file
- name: Prepare environment
env:
SIGNING_SECRET_KEY_CONTENT: ${{ secrets.SIGNING_SECRET_KEY_CONTENT }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
run: |
git fetch --unshallow
sudo bash -c "echo '$SIGNING_SECRET_KEY_CONTENT' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
# Public Locus API - core
- name: Publish `locus-api-core`
run: ./gradlew :locus-api-core:clean :locus-api-core:publishReleasePublicationToMavencentralRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
# Runs upload, and then closes & releases the repository
- name: Releaes repository
run: ./gradlew closeAndReleaseRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}