Fix publish workflow: use setup-java server config, remove broken her… #3
This file contains hidden or 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
| # Publishes com.github.mwinfie:cflint to GitHub Packages on each push to the | |
| # skip-includes-fix branch (SNAPSHOT) and on release creation. | |
| name: Publish package to GitHub Packages | |
| on: | |
| push: | |
| branches: [ skip-includes-fix, master, main ] | |
| release: | |
| types: [created] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 11 with GitHub Packages | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| server-id: github | |
| server-username: GITHUB_ACTOR | |
| server-password: GITHUB_TOKEN | |
| - name: Build and publish to GitHub Packages | |
| run: mvn -B deploy -DskipTests | |
| env: | |
| GITHUB_ACTOR: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |