Skip to content

sonar

sonar #905

Workflow file for this run

# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: publish
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/delete-package-versions@v3
with:
package-name: 'io.leaderli.litool.litool-all'
ignore-versions: '^\\d+\\.\\d+\\.0$'
min-versions-to-keep: 0
- uses: actions/delete-package-versions@v3
with:
package-name: 'io.leaderli.litool.litool-action'
ignore-versions: '^\\d+\\.\\d+\\.0$'
min-versions-to-keep: 0
- uses: actions/delete-package-versions@v3
with:
package-name: 'io.leaderli.litool.litool-ast'
ignore-versions: '^\\d+\\.\\d+\\.0$'
min-versions-to-keep: 0
- uses: actions/delete-package-versions@v3
with:
package-name: 'io.leaderli.litool.litool-config'
ignore-versions: '^\\d+\\.\\d+\\.0$'
min-versions-to-keep: 0
- uses: actions/delete-package-versions@v3
with:
package-name: 'io.leaderli.litool.litool-core'
ignore-versions: '^\\d+\\.\\d+\\.0$'
min-versions-to-keep: 0
- uses: actions/delete-package-versions@v3
with:
package-name: 'io.leaderli.litool.litool-dom'
ignore-versions: '^\\d+\\.\\d+\\.0$'
min-versions-to-keep: 0
- uses: actions/delete-package-versions@v3
with:
package-name: 'io.leaderli.litool.litool-json'
ignore-versions: '^\\d+\\.\\d+\\.0$'
min-versions-to-keep: 0
- uses: actions/delete-package-versions@v3
with:
package-name: 'io.leaderli.litool.litool-runner'
ignore-versions: '^\\d+\\.\\d+\\.0$'
min-versions-to-keep: 0
- uses: actions/delete-package-versions@v3
with:
package-name: 'io.leaderli.litool.litool-test'
ignore-versions: '^\\d+\\.\\d+\\.0$'
min-versions-to-keep: 0
- uses: actions/delete-package-versions@v3
with:
package-name: 'io.leaderli.litool.litool-parent'
ignore-versions: '^\\d+\\.\\d+\\.0$'
min-versions-to-keep: 0
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ github.token }}