Skip to content

0.2.2

0.2.2 #6

Workflow file for this run

name: Publish
on:
release:
types: [ created ]
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@v1
with:
username: arkivanov
password: ${{ secrets.SONATYPE_PASSWORD }}
staging-profile-id: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
description: Created by GitHub Actions
base_url: https://s01.oss.sonatype.org/service/local/
publish:
name: Publish
runs-on: macos-latest
needs: create-staging-repository
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: 17
- name: Publish
env:
SONATYPE_REPOSITORY_ID: ${{ needs.create-staging-repository.outputs.repository-id }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publish
close-staging-repository:
name: Close staging repository
runs-on: ubuntu-latest
needs: [ create-staging-repository, publish ]
steps:
- name: Close staging repository
uses: nexus-actions/[email protected]
with:
username: arkivanov
password: ${{ secrets.SONATYPE_PASSWORD }}
staging_repository_id: ${{ needs.create-staging-repository.outputs.repository-id }}
base_url: https://s01.oss.sonatype.org/service/local/
close_only: 'true'