-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
96 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
name: release-to-maven-central | ||
name: TESTING RELEASE | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseversion: | ||
description: 'Release version' | ||
required: true | ||
default: '3.0.0' | ||
default: '3.4.2-RC.1' | ||
copyDocsToCurrent: | ||
description: "Should the docs be published at https://docs.spring-boot-admin.com? Otherwise they will be accessible by version number only." | ||
required: true | ||
|
@@ -60,105 +60,12 @@ jobs: | |
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" --no-transfer-progress | ||
|
||
- name: Publish package | ||
run: mvn -B deploy -DskipTests=true --no-transfer-progress -P central-deploy -DskipTests=true | ||
run: mvn -B deploy -pl spring-boot-admin-dependencies -DskipTests=true --no-transfer-progress -P central-deploy -DskipTests=true | ||
env: | ||
#TODO: This is a workaround for NEXUS-27902 which uses XStream that fails on JVM >16 | ||
JDK_JAVA_OPTIONS: "--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED" | ||
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
|
||
- name: Deploy documentation to GitHub Pages for version ${{ github.event.inputs.releaseversion }} | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: spring-boot-admin-docs/target/generated-docs | ||
target-folder: ${{ github.event.inputs.releaseversion }} | ||
clean: true | ||
|
||
- name: Deploy redirect for /current to /${{ github.event.inputs.releaseversion }} | ||
uses: JamesIves/[email protected] | ||
if: github.event.inputs.copyDocsToCurrent == 'true' | ||
with: | ||
branch: gh-pages | ||
folder: spring-boot-admin-docs/target/generated-docs/current | ||
target-folder: /current | ||
clean: true | ||
|
||
- name: Deploy deeplink redirect for /current/* to /${{ github.event.inputs.releaseversion }}/* | ||
uses: JamesIves/[email protected] | ||
if: github.event.inputs.copyDocsToCurrent == 'true' | ||
with: | ||
branch: gh-pages | ||
folder: spring-boot-admin-docs/target/generated-docs/current | ||
target-folder: / | ||
clean: false | ||
|
||
publish-github-release: | ||
needs: publish-central-and-pages | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: free disk space | ||
continue-on-error: true | ||
run: | | ||
df -h | ||
sudo swapoff -a | ||
sudo rm -f /swapfile | ||
sudo apt clean | ||
docker rmi $(docker image ls -aq) | ||
df -h | ||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.inputs.releaseversion }} | ||
release_name: ${{ github.event.inputs.releaseversion }} | ||
body: | | ||
Grab the new version from Maven central https://repo1.maven.org/maven2/de/codecentric/ | ||
Current docs at https://codecentric.github.io/spring-boot-admin/${{ github.event.inputs.releaseversion }}/ | ||
### Things that changed in this release | ||
${{ steps.changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: ${{ contains(github.event.inputs.releaseversion, '-') }} | ||
|
||
set-next-snapshot-version: | ||
needs: publish-github-release | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set new SNAPSHOT version | ||
run: > | ||
mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" && \ | ||
mvn versions:set -DnextSnapshot && \ | ||
VERSION=$(mvn exec:exec -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive -q) && \ | ||
mvn versions:revert && \ | ||
mvn versions:set-property -Dproperty=revision -DnewVersion="$VERSION" && | ||
mvn versions:commit | ||
- name: Commit new SNAPSHOT version | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
with: | ||
commit_message: "chore: update to next SNAPSHOT version" | ||
|
||
|