Maven 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: Maven 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 }} | |
- uses: s4u/[email protected] | |
with: | |
servers: ' | |
[{ | |
"id": "github", | |
"configuration": { | |
"httpHeaders": { | |
"property": { | |
"name": "Authorization", | |
"value": "Bearer ${{ secrets.GITHUB_TOKEN }}" | |
} | |
} | |
} | |
}]' | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Publish to GitHub Packages Apache Maven | |
run: mvn clean source:jar deploy -DuniqueVersion=false -Dmaven.source.useDefaultManifestFile=true -DdeplyAtEnd=true -Dmaven.source.includePom=true -Dmaven.install.skip=true | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |