Gradle Package #5
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 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 }} |