forked from codecentric/spring-boot-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
codecentric#1579: publish-github-pages job now in both workflows. Als…
…o refactored release-to-maven-central.yml to have 3 jobs now: publish, pages and release
- Loading branch information
1 parent
a95fa20
commit 5cbea80
Showing
2 changed files
with
78 additions
and
34 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 |
---|---|---|
|
@@ -3,39 +3,39 @@ name: build | |
on: [push] | ||
|
||
jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# | ||
# - uses: actions/checkout@v2 | ||
# | ||
# - name: Set up JDK 1.8 | ||
# uses: actions/setup-java@v1 | ||
# with: | ||
# java-version: 1.8 | ||
# | ||
# - name: Build with Maven | ||
# run: mvn -B install --no-transfer-progress --file pom.xml | ||
# | ||
# publish-snapshot: | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# | ||
# - name: Set up settings.xml for GitHub Packages | ||
# uses: actions/setup-java@v1 | ||
# with: | ||
# java-version: 1.8 | ||
# | ||
# - name: Publish SNAPSHOT version to GitHub Packages (we can skip tests, since we only deploy, if the build workflow succeeded) | ||
# run: mvn -B --no-transfer-progress deploy -DskipTests | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Build with Maven | ||
run: mvn -B install --no-transfer-progress --file pom.xml | ||
|
||
publish-snapshot: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up settings.xml for GitHub Packages | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Publish SNAPSHOT version to GitHub Packages (we can skip tests, since we only deploy, if the build workflow succeeded) | ||
run: mvn -B --no-transfer-progress deploy -DskipTests | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-github-pages: | ||
#needs: publish-snapshot | ||
needs: publish-snapshot | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -46,8 +46,8 @@ jobs: | |
with: | ||
java-version: 1.8 | ||
|
||
- name: Generate spring-boot-admin-docs only | ||
run: mvn -B --no-transfer-progress --projects spring-boot-admin-docs package -DskipTests | ||
- name: Publish SNAPSHOT version to GitHub Packages (we can skip tests, since we only deploy, if the build workflow succeeded) | ||
run: mvn -B --no-transfer-progress package --projects spring-boot-admin-docs -DskipTests | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
@@ -58,7 +58,7 @@ jobs: | |
- name: Show extracted Maven project version | ||
run: echo ${{ steps.project.outputs.version }} | ||
|
||
- name: Deploy GitHub Pages | ||
- name: Deploy Asciidoc docs output to GitHub Pages | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
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 |
---|---|---|
|
@@ -36,6 +36,48 @@ jobs: | |
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
|
||
|
||
publish-github-pages: | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up settings.xml for GitHub Packages | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Publish SNAPSHOT version to GitHub Packages (we can skip tests, since we only deploy, if the build workflow succeeded) | ||
run: mvn -B --no-transfer-progress package --projects spring-boot-admin-docs -DskipTests | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract Maven project version for Asciidoc GitHub Pages directory naming | ||
run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) | ||
id: project | ||
|
||
- name: Show extracted Maven project version | ||
run: echo ${{ steps.project.outputs.version }} | ||
|
||
- name: Deploy Asciidoc docs output to GitHub Pages | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: spring-boot-admin-docs/target/generated-docs # The folder the action should deploy. | ||
TARGET_FOLDER: ${{ steps.project.outputs.version }} | ||
CLEAN: true # Automatically remove deleted files from the deploy branch | ||
|
||
|
||
publish-github-release: | ||
needs: publish-github-pages | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/[email protected] | ||
|
@@ -53,6 +95,8 @@ jobs: | |
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 | ||
|