2.2.0 #56
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
release: | |
types: [ created ] | |
jobs: | |
create-staging-repository: | |
runs-on: ubuntu-latest | |
name: Create staging repository | |
outputs: | |
repository-id: ${{ steps.create.outputs.repository_id }} | |
steps: | |
- id: create | |
name: Create staging repository | |
uses: nexus-actions/create-nexus-staging-repo@3e5e7209801629febdcf75541a4898710d28df9a | |
with: | |
username: ${{ secrets.SONATYPE_USERNAME }} | |
password: ${{ secrets.SONATYPE_PASSWORD }} | |
staging_profile_id: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | |
description: ${{ github.repository }}/${{ github.workflow }}#${{ github.run_number }} | |
publish: | |
name: Publish | |
runs-on: macos-14 | |
needs: create-staging-repository | |
env: | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Select Xcode version | |
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd | |
with: | |
xcode-version: '15.2.0' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
cache-read-only: true | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: Publish | |
run: > | |
./gradlew | |
publishAllFilteredToSonatype | |
-Psigning.password=${{ secrets.SIGNING_PASSWORD }} | |
-Psonatype.username=${{ secrets.SONATYPE_USERNAME }} | |
-Psonatype.password=${{ secrets.SONATYPE_PASSWORD }} | |
-Psonatype.repository=${{ needs.create-staging-repository.outputs.repository-id }} | |
check: | |
name: Check publication | |
runs-on: macos-14 | |
needs: [ create-staging-repository, publish ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Select Xcode version | |
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd | |
with: | |
xcode-version: '15.2.0' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
cache-read-only: true | |
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
- name: Check publication | |
run: > | |
./gradlew | |
:tools:check-publication:build | |
--exclude-task kotlinStoreYarnLock | |
-Pcheck_publication | |
-Psonatype.username=${{ secrets.SONATYPE_USERNAME }} | |
-Psonatype.password=${{ secrets.SONATYPE_PASSWORD }} | |
-Psonatype.repository=${{ needs.create-staging-repository.outputs.repository-id }} | |
close-staging-repository: | |
runs-on: ubuntu-latest | |
needs: [ create-staging-repository, check ] | |
if: ${{ always() && needs.create-staging-repository.result == 'success' }} | |
steps: | |
- name: Discard | |
if: ${{ needs.check.result != 'success' }} | |
uses: nexus-actions/drop-nexus-staging-repo@59443053a1b36f5f71ede68776d73294bf4bfb5e | |
with: | |
username: ${{ secrets.SONATYPE_USERNAME }} | |
password: ${{ secrets.SONATYPE_PASSWORD }} | |
staging_repository_id: ${{ needs.create-staging-repository.outputs.repository-id }} | |
- name: Release | |
if: ${{ needs.check.result == 'success' }} | |
uses: nexus-actions/release-nexus-staging-repo@f2b4c7f64ecec2cb0d24349182c1bbeda5c4c056 | |
with: | |
username: ${{ secrets.SONATYPE_USERNAME }} | |
password: ${{ secrets.SONATYPE_PASSWORD }} | |
staging_repository_id: ${{ needs.create-staging-repository.outputs.repository-id }} |