[maven-release-plugin] prepare for next development iteration #180
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: CI | |
on: | |
push: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
- master | |
- release/** | |
- develop/** | |
jobs: | |
build: | |
if: ${{ !startsWith(github.event.head_commit.message, '[maven-release-plugin] prepare') }} | |
runs-on: ubuntu-latest | |
name: Build on Java 17 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
- name: Setup java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 17 | |
distribution: adopt | |
- run: mvn -B verify -Dgpg.skip=true | |
- name: Upload test coverage | |
uses: codecov/codecov-action@v2 | |
release: | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
needs: [build] | |
name: Release | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
- name: Setup Java 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 17 | |
distribution: adopt | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Set env.BRANCH_NAME | |
run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- name: Release and Publish | |
uses: qcastel/[email protected] | |
with: | |
access-token: ${{ secrets.FREE_NOW_GITHUB_ACCESS_TOKEN }} | |
release-branch-name: "master" | |
maven-args: "-DskipTests -DskipITs" | |
git-release-bot-name: "free-now-github" | |
git-release-bot-email: "[email protected]" | |
git-skip-sanity-check: true | |
ssh-private-key: ${{ secrets.FREE_NOW_GITHUB_PRIVATE_KEY }} | |
maven-project-folder: ${{ matrix.path }} | |
maven-repo-server-id: ossrh | |
maven-repo-server-username: ${{ secrets.FREE_NOW_MAVEN_USERNAME }} | |
maven-repo-server-password: ${{ secrets.FREE_NOW_MAVEN_ACCESS_TOKEN }} | |
gpg-enabled: true | |
gpg-key-id: ${{ secrets.FREE_NOW_GPG_KEY_ID }} | |
gpg-key: ${{ secrets.FREE_NOW_GPG_KEY }} | |
gpg-passphrase: ${{ secrets.FREE_NOW_GPG_PASSPHRASE }} | |
env: | |
JAVA_HOME: /usr/lib/jvm/java-17-openjdk/ | |