Skip to content

Delivery

Delivery #57

Workflow file for this run

name: Delivery
on:
workflow_dispatch:
env:
GRADLE_CACHE_CLEANUP: true
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: 17
jobs:
# --------------------------------- Stage 1 ----------------------------------
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
repository_identifier: ${{ steps.create.outputs.repository_id }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/[email protected]
with:
gradle-home-cache-cleanup: ${{ env.GRADLE_CACHE_CLEANUP }}
- name: Detect project version
run: |
echo "PROJECT_VERSION=$(./gradlew :types:version -q)" >> "$GITHUB_ENV"
- name: Create staging repository
id: create
uses: nexus-actions/[email protected]
with:
username: ${{ secrets.SONATYPE_USERNAME }}
password: ${{ secrets.SONATYPE_PASSWORD }}
staging_profile_id: ${{ secrets.SONATYPE_PROFILE }}
base_url: https://s01.oss.sonatype.org/service/local/
description:
Kotools Types ${{ env.PROJECT_VERSION }} (${{ github.run_number }})
# --------------------------------- Stage 2 ----------------------------------
delivery:
name: Delivery
needs: setup
runs-on: macos-12
env:
GIT_USER: ${{ secrets.GIT_USER }}
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_REPOSITORY_IDENTIFIER:
${{ needs.setup.outputs.repository_identifier }}
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/[email protected]
with:
gradle-home-cache-cleanup: ${{ env.GRADLE_CACHE_CLEANUP }}
- name: Deliver 'types-internal' subproject
run: ./gradlew :types-internal:publishAllPublicationsToOSSRHRepository
- name: Deliver 'types' subproject
run: ./gradlew :types:publishAllPublicationsToOSSRHRepository
- name: Deliver 'types-kotlinx-serialization' subproject
run: |
./gradlew \
:types-kotlinx-serialization:publishAllPublicationsToOSSRHRepository