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 action artifact to GitHub project's Maven repository | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
# Add branches here if you want to publish the action for more branches | |
- 'main' | |
- '[0-9]+.[0-9]+' | |
- '[0-9]+.[0-9]+.[0-9]+' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-and-push-action: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: maven | |
- name: Build and publish action to Maven repository | |
shell: bash | |
run: | | |
./mvnw -B clean deploy -Dquarkus.package.jar.type=uber-jar -Dquarkus.package.jar.add-runner-suffix=false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |