Create App.java #1
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 JAR to GitHub Packages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
pull_request: | |
paths: | |
- 'src/**' | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
server-id: github | |
settings-path: ${{ github.workspace }} | |
- name: Build with Maven | |
run: mvn clean package | |
- name: Publish to GitHub Packages | |
run: mvn deploy -s ${{ github.workspace }}/settings.xml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |