Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

1.4.13 - update fomantic to 2.9.3 #64

1.4.13 - update fomantic to 2.9.3

1.4.13 - update fomantic to 2.9.3 #64

name: "Publish to Maven Central"
on:
workflow_dispatch:
release:
types: [published]
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
env:
SONATYPE_USERNAME: ${{ secrets.OSSRHUSERNAME }}
SONATYPE_PASSWORD: ${{ secrets.OSSRHPASSWORD }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRHUSERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRHPASSWORD }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNINGKEYID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNINGPASSWORD }}
jobs:
publish:
name: Build and Publish to Sonatype
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build and run tests
run: ./gradlew build
- name: Publish to Sonatype
run: |
VERSION=$(git tag --sort=committerdate | tail -1)
echo Publishing $VERSION to Sonatype
./gradlew -Pversion=$VERSION publish
## Couldn't get this working yet, need to get the SONATYPE_REPOSITORY_ID from output of publish step. For now
## closing and release will need to be manual.
# release:
# name: Close and Release Sonatype staging repository
# runs-on: ubuntu-latest
# needs: [test, publish]
# if: ${{ always() && needs.test.result == 'success' && needs.publish.result == 'success' }}
# steps:
# - name: Release
# uses: nexus-actions/release-nexus-staging-repo@f2b4c7f64ecec2cb0d24349182c1bbeda5c4c056
# with:
# base_url: https://s01.oss.sonatype.org/service/local/
# username: ${{ secrets.OSSRHUSERNAME }}
# password: ${{ secrets.OSSRHPASSWORD }}
# staging_repository_id: no ${{ secrets.SONATYPE_REPOSITORY_ID }}
# description: Closed ${{ github.repository }}#${{ github.run_number }}
# close_only: false