-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
2 changed files
with
10 additions
and
29 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 |
---|---|---|
|
@@ -26,7 +26,6 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
token: ${{ secrets.WORKFLOW_TOKEN }} | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
|
@@ -107,6 +106,8 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.open-release.outputs.TAG }} | ||
token: ${{ secrets.WORKFLOW_TOKEN }} | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
|
@@ -137,43 +138,23 @@ jobs: | |
-Dstaging_host="${{ env.STAGING_HOST }}" | ||
deploy -P release | ||
document: | ||
name: Publish Javadoc documentation | ||
needs: [ open-release, deploy ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.open-release.outputs.TAG }} | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
java-version: | | ||
8 | ||
23 | ||
- name: Configure Git User | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Gili Tzabari" | ||
# Must quote exclamation mark on bash: https://stackoverflow.com/a/27177197/14731 | ||
- name: Generate Javadoc | ||
run: | | ||
./mvnw --batch-mode -V -e verify javadoc:aggregate -pl !dropwizard,!jersey | ||
./mvnw --batch-mode -V -e javadoc:aggregate -pl '!dropwizard,!jersey' | ||
mkdir --parents "${{ needs.open-release.outputs.VERSION }}/docs" | ||
mv target/reports/apidocs "${{ needs.open-release.outputs.VERSION }}/docs/api" | ||
- name: Commit changes | ||
run: | | ||
git checkout gh-pages | ||
git checkout gh-pages -f | ||
echo "INITIAL_GH_PAGES_POSITION=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | ||
git add "${{ needs.open-release.outputs.VERSION }}/docs/api" | ||
git commit -m "Released version ${{ needs.open-release.outputs.VERSION }}" | ||
git push | ||
close-release: | ||
needs: [ open-release, deploy, document ] | ||
needs: [ open-release, deploy ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -215,8 +196,8 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
fetch-depth: 0 | ||
token: ${{ secrets.WORKFLOW_TOKEN }} | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
|
@@ -250,8 +231,8 @@ jobs: | |
git push -f origin ${{ github.ref_name }} | ||
fi | ||
- name: Delete master's tag | ||
if: needs.open-release.outputs.INITIAL_MASTER_POSITION != '' | ||
- name: Delete tag | ||
if: needs.open-release.outputs.TAG != '' | ||
run: | | ||
git push --delete origin ${{ needs.open-release.outputs.TAG }} | ||
|
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