Skip to content

Release Gradle

Release Gradle #1

Workflow file for this run

name: Release Gradle
on:
workflow_dispatch:
jobs:
build:
name: release-gradle
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Setup LXD
uses: canonical/setup-lxd@main
with:
channel: 5.21/candidate
- name: Build and verify project
run: |
sudo snap install rockcraft --classic
./gradlew clean build -i
- name: Publish to Gradle plugin repository
id: deploy
run: |
./gradlew publishPlugins -Pgradle.publish.key=$PUBLISH_KEY -Pgradle.publish.secret=$PUBLISH_SECRET
shell: bash
env:
PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}