Fix github actions publishing (temporarily disable finalize) #2
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: Build Artifacts for Publishing | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- 'v*' | ||
env: | ||
# GPG signature credentials | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | ||
# Solo Studios maven repo credentials | ||
ORG_GRADLE_PROJECT_SoloStudiosUsername: ${{ secrets.SOLO_STUDIOS_USERNAME }} | ||
ORG_GRADLE_PROJECT_SoloStudiosPassword: ${{ secrets.SOLO_STUDIOS_PASSWORD }} | ||
# Sonatype maven repo credentials | ||
ORG_GRADLE_PROJECT_SonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} | ||
ORG_GRADLE_PROJECT_SonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} | ||
JAVA_VERSION: 17 | ||
JAVA_DISTRIBUTION: temurin | ||
jobs: | ||
create-staging-repo: | ||
name: Create Sonatype Staging Repository | ||
runs-on: ubuntu-latest | ||
outputs: | ||
repository-id: ${{ steps.create.outputs.repository_id }} | ||
steps: | ||
- name: Create Staging Repository | ||
id: create | ||
uses: nexus-actions/create-nexus-staging-repo@3e5e7209801629febdcf75541a4898710d28df9a | ||
with: | ||
base_url: https://s01.oss.sonatype.org/service/local/ | ||
username: ${{ secrets.SONATYPE_USERNAME }} | ||
password: ${{ secrets.SONATYPE_PASSWORD }} | ||
staging_profile_id: ${{ secrets.SONATYPE_PROFILE_ID }} | ||
description: ${{ github.repository }}/${{ github.workflow }}#${{ github.run_number }} | ||
publish-windows: | ||
name: Publish Windows Artifacts | ||
runs-on: windows-latest | ||
needs: [ create-staging-repository ] | ||
Check failure on line 45 in .github/workflows/publish.yml GitHub Actions / Build Artifacts for PublishingInvalid workflow file
|
||
env: | ||
ORG_GRADLE_PROJECT_repositoryId: ${{ needs.create-staging-repo.outputs.repository-id }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-tags: true | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "${{ env.JAVA_VERSION }}" | ||
distribution: "${{ env.JAVA_DISTRIBUTION }}" | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Publish MinGW artifacts | ||
run: | | ||
./gradlew \ | ||
publishMingwX64PublicationToSoloStudiosRepository publishMingwX64PublicationToSonatypeRepository | ||
publish-mac: | ||
name: Publish macOS artifacts | ||
runs-on: macos-latest | ||
needs: [ create-staging-repository ] | ||
env: | ||
ORG_GRADLE_PROJECT_repositoryId: ${{ needs.create-staging-repo.outputs.repository-id }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-tags: true | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "${{ env.JAVA_VERSION }}" | ||
distribution: "${{ env.JAVA_DISTRIBUTION }}" | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Publish MacOS/iOS/TvOS/WatchOS artifacts | ||
run: | | ||
./gradlew \ | ||
publishMacosX64PublicationToSoloStudiosRepository publishMacosX64PublicationToSonatypeRepository \ | ||
publishMacosArm64PublicationToSoloStudiosRepository publishMacosArm64PublicationToSonatypeRepository \ | ||
publishIosArm64PublicationToSoloStudiosRepository publishIosArm64PublicationToSonatypeRepository \ | ||
publishIosX64PublicationToSoloStudiosRepository publishIosX64PublicationToSonatypeRepository \ | ||
publishIosSimulatorArm64PublicationToSoloStudiosRepository publishIosSimulatorArm64PublicationToSonatypeRepository \ | ||
publishTvosX64PublicationToSoloStudiosRepository publishTvosX64PublicationToSonatypeRepository \ | ||
publishTvosArm64PublicationToSoloStudiosRepository publishTvosArm64PublicationToSonatypeRepository \ | ||
publishTvosSimulatorArm64PublicationToSoloStudiosRepository publishTvosSimulatorArm64PublicationToSonatypeRepository \ | ||
publishWatchosX64PublicationToSoloStudiosRepository publishWatchosX64PublicationToSonatypeRepository \ | ||
publishWatchosArm64PublicationToSoloStudiosRepository publishWatchosArm64PublicationToSonatypeRepository \ | ||
publishWatchosSimulatorArm64PublicationToSoloStudiosRepository publishWatchosSimulatorArm64PublicationToSonatypeRepository | ||
publish-linux: | ||
name: Publish Linux Artifacts | ||
runs-on: ubuntu-latest | ||
needs: [ create-staging-repository ] | ||
env: | ||
ORG_GRADLE_PROJECT_repositoryId: ${{ needs.create-staging-repo.outputs.repository-id }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-tags: true | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "${{ env.JAVA_VERSION }}" | ||
distribution: "${{ env.JAVA_DISTRIBUTION }}" | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Publish Linux/Multiplatform/JVM/JS artifacts | ||
run: | | ||
./gradlew \ | ||
publishLinuxX64PublicationToSoloStudiosRepository publishLinuxX64PublicationToSonatypeRepository \ | ||
publishLinuxArm64PublicationToSoloStudiosRepository publishLinuxArm64PublicationToSonatypeRepository \ | ||
publishKotlinMultiplatformPublicationToSoloStudiosRepository publishKotlinMultiplatformPublicationToSonatypeRepository \ | ||
publishJvmPublicationToSoloStudiosRepository publishJvmPublicationToSonatypeRepository \ | ||
publishJsPublicationToSoloStudiosRepository publishJsPublicationToSonatypeRepository | ||
# finalize: | ||
# runs-on: ubuntu-latest | ||
# needs: [ create-staging-repo, publish-windows, publish-mac, publish-linux ] | ||
# if: ${{ always() && needs.create-staging-repo.result == 'success' }} | ||
# steps: | ||
# - name: Discard | ||
# if: ${{ needs.publish-windows.result != 'success' || needs.publish-mac.result != 'success' || needs.publish-linux.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-repo.outputs.repository-id }} | ||
# - name: Release | ||
# if: ${{ needs.publish-windows.result == 'success' && needs.publish-mac.result == 'success' && needs.publish-linux.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-repo.outputs.repository-id }} |