Publish Snapshot to GitHub #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: Publish Snapshot to GitHub | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to publish' | |
required: true | |
default: '1.3.0-SNAPSHOT' | |
ref: | |
description: 'Type the Branch, Tag or SHA to use for publishing Snapshot' | |
required: false | |
default: 'master' | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build_snapshot: | |
name: Build Snapshot | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
- name: Set up Java 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'liberica' | |
java-version: 21 | |
cache: 'maven' | |
server-id: github | |
- name: Compile & Deploy to GitHub Packages | |
run: mvn -Drevision=${{ github.event.inputs.version }} -B deploy -DdeployAtEnd --file pom.xml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |