ci: remove snapshot publish job #2
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: Gradle deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
outputs: | |
release-created: ${{ steps.release.outputs.release-created }} | |
steps: | |
- name: Release Please Action | |
id: release | |
uses: googleapis/release-please-action@v4 | |
with: | |
config-file: .github/release-please/config.json | |
manifest-file: .github/release-please/manifest.json | |
publish: | |
needs: release | |
if: needs.release.outputs.release-created == 'true' | |
runs-on: ubuntu-latest | |
environment: Vela | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get JDK version | |
run: echo "JDK_VERSION=$(grep 'jdkVersion' gradle.properties | cut -d '=' -f2)" >> "$GITHUB_ENV" | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: ${{ env.JDK_VERSION }} | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Grant execute permission to gradlew | |
run: chmod +x gradlew | |
- name: Publish with Gradle | |
id: publish | |
run: ./gradlew publish | |
env: | |
ORG_GRADLE_PROJECT_velaUsername: ${{ secrets.VELA_USERNAME }} | |
ORG_GRADLE_PROJECT_velaPassword: ${{ secrets.VELA_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} |