Publish to Maven #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle | |
name: Gradle Package | |
on: | |
workflow_dispatch: | |
# TODO: Temporary | |
# release: | |
# types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
server-id: central | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_CENTRAL_TOKEN | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
cache: maven | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Execute Gradle build | |
run: ./gradlew build | |
env: | |
STADIA_API_KEY: ${{ secrets.STADIA_API_KEY }} | |
- name: Release | |
run: ./gradlew jreleaserFullRelease |