-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (53 loc) · 2.48 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Release
on:
workflow_dispatch
jobs:
create_staging_repository:
runs-on: ubuntu-latest
name: Create staging repository
outputs:
repository_id: ${{ steps.create.outputs.repository_id }}
steps:
- id: create
uses: nexus-actions/create-nexus-staging-repo@main
with:
username: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
password: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
staging_profile_id: ${{ secrets.SONATYPE_PROFILE_ID }}
# Defaults to the https://oss.sonatype.org, not https://s01.oss.sonatype.org
base_url: https://s01.oss.sonatype.org/service/local/
description: ${{ github.repository }}/${{ github.workflow }}#${{ github.run_number }}
release:
needs: [create_staging_repository]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
include:
- os: ubuntu-latest
# On ubuntu publish everything you can i.e. the linuxX64 and jvm binaries
publish_command: build publishAllPublicationsToOss
platform: linux
- os: macOS-latest
# publishTvosX64PublicationToOss publishTvosArm64PublicationToOss publishWatchosX64PublicationToOss publishWatchosArm32PublicationToOss publishWatchosArm64PublicationToOss
publish_command: build publishMacosX64PublicationToOss publishMacosArm64PublicationToOss publishIosX64PublicationToOss publishIosArm64PublicationToOss publishIosSimulatorArm64PublicationToOss
platform: mac
- os: windows-latest
publish_command: build publishMingwX64PublicationToOss
platform: windows
env:
SONATYPE_REPOSITORY_ID: ${{ needs.create_staging_repository.outputs.repository_id }}
SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
NEW_SIGNING_KEY_ID_BASE64: ${{ secrets.NEW_SIGNING_KEY_ID_BASE64 }}
NEW_SIGNING_KEY_ID_BASE64_PASS: ${{ secrets.NEW_SIGNING_KEY_ID_BASE64_PASS }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- run: ./gradlew ${{ matrix.publish_command }} -Pplatform=${{ matrix.platform }} -PisCI -no-daemon --stacktrace