Skip to content

build and publish a release #53

build and publish a release

build and publish a release #53

Workflow file for this run

name: build and publish a release
on:
release:
types: [published]
jobs:
create-staging-repository:
uses: kosi-libs/kodein-internal-github-actions/.github/workflows/create-nexus-staging-repository.yml@main

Check failure on line 9 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / build and publish a release

Invalid workflow file

The workflow is not valid. In .github/workflows/release.yml (Line: 9, Col: 11): Error from called workflow kosi-libs/kodein-internal-github-actions/.github/workflows/create-nexus-staging-repository.yml@main (Line: 11, Col: 24): Unrecognized named-value: 'jobs'. Located at position 1 within expression: jobs.create-staging-repository.outputs.repository-id In .github/workflows/release.yml (Line: 9, Col: 11): Error from called workflow kosi-libs/kodein-internal-github-actions/.github/workflows/create-nexus-staging-repository.yml@main (Line: 11, Col: 24): Unexpected value '${{ jobs.create-staging-repository.outputs.repository-id }}'
secrets: inherit
build-upload:
needs: create-staging-repository
runs-on: macOS-latest
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.PGP_SIGNING_KEY }}
GPG_PRIVATE_PASSWORD: ${{ secrets.PGP_SIGNING_PASSWORD }}
steps:
- name: Setup
uses: kosi-libs/kodein-internal-github-actions/setup@main
- name: Check
uses: ./.github/actions/check
- name: Upload
run: ./gradlew --stacktrace --scan publishAllPublicationsToOssrhStagingRepository -Porg.kodein.sonatype.repositoryId=${{ needs.create-staging-repository.outputs.repository-id }}
shell: bash
drop-or-release-staging-repository:
needs: [create-staging-repository, build-upload]
if: ${{ always() && needs.create-staging-repository.result == 'success' }}
uses: kosi-libs/kodein-internal-github-actions/.github/workflows/create-nexus-staging-repository.yml@main
secrets: inherit
with:
repository-id: ${{ needs.create-staging-repository.outputs.repository-id }}
build-upload-result: ${{ needs.build-upload.result }}
gradle-plugin:
runs-on: ubuntu-latest
needs: [build-upload, drop-or-release-staging-repository]
steps:
- name: Setup
uses: kosi-libs/kodein-internal-github-actions/setup@main
with:
with-konan: false
- name: Publish
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: ./gradlew --scan publishPlugins