Merge pull request #663 from gruelbox/dependabot/maven/org.apache.mav… #501
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: Continous Delivery | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-package: jdk | |
java-version: 21 | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
cache: 'maven' | |
- name: Build, publish to GPR and tag | |
run: | | |
if [ "$GITHUB_REPOSITORY" == "gruelbox/transaction-outbox" ]; then | |
revision="6.0.$GITHUB_RUN_NUMBER" | |
echo "Building $revision at $GITHUB_SHA" | |
mvn -Pconcise,delombok,only-nodb-tests -B deploy -s $GITHUB_WORKSPACE/settings.xml -Drevision="$revision" -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | |
echo "Tagging $revision" | |
git tag $revision | |
git push origin $revision | |
else | |
mvn -Pconcise,delombok,only-nodb-tests -B package -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | |
fi | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |