This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
DRAFT Publish github maven package #1
Workflow file for this run
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 github maven package | |
on: | |
workflow_dispatch: | |
jobs: | |
build-package: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: disable workflow | |
run: | | |
false | |
- name: get env data | |
run: | | |
echo "********************** STANDARD ENV VARIABLES ********************" | |
env | |
echo "" | |
echo "********************** GITHUB EVENT json *************************" | |
echo "${GITHUB_CONTEXT}" | jq '.' | |
false | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
server-id: github | |
settings-path: ${{ github.workspace }} | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Publish maven package to GitHub Packages | |
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml | |
env: | |
# GITHUB_TOKEN: ${{ github.token }} | |
GITHUB_TOKEN: ${{ secrets.PKG_PUSH_TOKEN }} |