Fix publish #14
Workflow file for this run
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
name: Release and Publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Create Release | |
run: gh release create ${{ github.ref_name }} --title "Amuze $(echo ${{ github.ref_name }} | rev | cut -d 'v' -f 1)" --notes "Initial release" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
needs: release | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Publish to Maven Central | |
run: ./gradlew amuze:publishAllPublicationsToMavenCentral | |
env: | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} | |
#- name: Publish to Github Packages | |
# run: ./gradlew amuze:publish | |
#env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |