mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-12 06:48:09 +02:00
* in order to make an omelet, you have to break a few eggs. aka absolutely decimate the gradle project * far more sane gradle, no publishing yet tho * attempt maven deploy * fix publish url and use snapshot repo * fix secret names * release, and properly set version * attempt to set group correctly * more gradle fixups
32 lines
946 B
YAML
32 lines
946 B
YAML
name: Gradle Publish to Maven Central
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
|
|
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
|
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
- name: Set outputs
|
|
id: vars
|
|
run: |
|
|
echo "short_commit_hash=${GITHUB_SHA::10}" >> $GITHUB_OUTPUT
|
|
- name: Publish to Sonatype
|
|
env:
|
|
SHORT_COMMIT_HASH: ${{ steps.vars.outputs.short_commit_hash }}
|
|
run: |
|
|
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
|
|
echo "Version: ${SHORT_COMMIT_HASH}" >> $GITHUB_STEP_SUMMARY
|