MSE-5408 #17
Workflow file for this run
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: build pull request | |
# Builds a pull request, basing the artifact name on the branch name on which it is based, so it can be published | |
# without breaking things, and enabled to build other pull requests depending on the current one. | |
# For e.g. if you make a pull request based on a branch feature/foobar on the main branch which is 6.1-SNAPSHOT, | |
# then it will be built and published as 6.1.foobar-SNAPSHOT | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | |
steps: | |
- name: Cancel previous Action | |
uses: styfle/[email protected] | |
continue-on-error: true # for act | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
cache: 'maven' | |
server-id: vpro-ossrh | |
server-username: SONATYPE_USERNAME | |
server-password: SONATYPE_PASSWORD | |
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} | |
gpg-passphrase: GPG_SECRET_KEY_PASSPHRASE | |
- name: Build with Maven | |
run: | | |
mvn -B -Dchangelist=.${GITHUB_HEAD_REF##*/}-SNAPSHOT -Pdeploy,ossrh deploy -Dgpg.skip=false | |
env: | |
SONATYPE_USERNAME: vpro | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD}} | |
GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }} | |