nexus-actions / create-nexus-staging-repo

Avoid split staging repos when publishing to Maven Central
6 stars 2 forks source link

create-nexus-staging-repo Github Action

This action creates a new staging repo so that you can upload all your files without having multiple implicit repos being created and your files in different places

How to use it

Here is an example of how to use this action in your workflows.

jobs:
  create_staging_repository:
    runs-on: ubuntu-latest
    name: Create staging repository
    outputs:
      repository_id: ${{ steps.create.outputs.repository_id }}
    steps:
      - id: create
        # replace '@main' with the latest commit sha, see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

        uses: nexus-actions/create-nexus-staging-repo@main
        with:
          username: ${{ secrets.SONATYPE_USERNAME }}
          password: ${{ secrets.SONATYPE_PASSWORD }}
          staging_profile_id: ${{ secrets.SONATYPE_PROFILE_ID }}
          description: ${{ github.repository }}/${{ github.workflow }}#${{ github.run_number }}

The different arguments are:

See the nexus-actions-demo repo for more details and use cases.


This action is brought to you by ...