Release & Deploy #25
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: Release & Deploy | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseVersion: | |
description: 'Release version' | |
required: true | |
type: string | |
jobs: | |
# commit-release: | |
# name: Commit release | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# | |
# - name: Version | |
# id: vars | |
# shell: bash | |
# run: | | |
# echo ${RELEASE_VERSION} > VERSION | |
# git add VERSION | |
# git config --global user.email "${{ secrets.COMMIT_EMAIL }}" | |
# git config --global user.name "${{ secrets.COMMIT_AUTHOR }}" | |
# git commit -m "release: Releasing version ${RELEASE_VERSION}" | |
# git push origin master | |
# env: | |
# RELEASE_VERSION: ${{ inputs.releaseVersion }} | |
release: | |
# needs: commit-release | |
name: tagging-and-releasing | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
env: | |
JRELEASER_TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} | |
JRELEASER_TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} | |
JRELEASER_TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | |
JRELEASER_TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} | |
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} | |
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
JRELEASER_DISCORD_WEBHOOK: ${{ secrets.SPRING_CONFIGURATION_PROPERTY_DOCUMENTER_DISCORD_WEBHOOK }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'temurin' | |
cache: maven | |
- name: Stage Files for Release | |
run: | | |
./mvnw versions:set -DnewVersion=$RELEASE_VERSION | |
./mvnw -Prelease deploy -DskipITs -DaltDeploymentRepository=local::file:./target/staging-deploy -pl '!spring-configuration-property-documenter-report' | |
./scripts/jbang-version-release.sh $RELEASE_VERSION | |
env: | |
RELEASE_VERSION: ${{ inputs.releaseVersion }} | |
- name: Run JReleaser - Full Release | |
run: | | |
./mvnw jreleaser:full-release -Prelease -N | |