Skip to content

Gradle Package

Gradle Package #5

name: Gradle Package
on:
workflow_dispatch:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
# Run build before running publish to make the failing step clear
- name: Build with Gradle
uses: gradle/[email protected]
with:
gradle-version: 8.4
arguments: build
- name: Publish to GitHub Packages
uses: gradle/[email protected]
with:
gradle-version: 8.4
arguments: publish
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}