Skip to content

Create and publish a release to Github Packages #4

Create and publish a release to Github Packages

Create and publish a release to Github Packages #4

name: Create and publish a release to Github Packages
on:
workflow_dispatch:
release:
types: [published] # Will trigger on (pre)release creation
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build and publish
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_VERSION: ${{ github.event.release.name }}