Skip to content

Commit

Permalink
TEST: site and JavaDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
inkarkat committed Jun 20, 2024
1 parent a6e5d1c commit bb97b18
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,9 @@ on:
value: ${{ jobs.build_main_branch.outputs.release-version }}

jobs:
build_feature_branch:
name: Build feature branch
runs-on: ubuntu-latest
if: "github.ref != 'refs/heads/main'"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Java and Maven
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
- name: Build with Maven verify
run: ./mvnw -B verify
build_main_branch:
name: Build main branch
runs-on: ubuntu-latest
if: "github.ref == 'refs/heads/main'"
outputs:
release-version: ${{ steps.set-version.outputs.release-version }}
steps:
Expand All @@ -64,29 +46,9 @@ jobs:
run: |
MAVEN_POM_REVISION_VERSION="$(./mvnw help:evaluate -Dexpression=revision -q -DforceStdout)"
echo "MAVEN_POM_REVISION_VERSION=$MAVEN_POM_REVISION_VERSION" >> $GITHUB_ENV
- name: Check if revision is already tagged
shell: bash
run: |
if git tag -l $MAVEN_POM_REVISION_VERSION | grep -q $MAVEN_POM_REVISION_VERSION; then
echo "Revision $MAVEN_POM_REVISION_VERSION is already tagged. Skipping the build and deployment!"
exit 0
else
DEPLOY_RELEASE=true
echo "DEPLOY_RELEASE=$DEPLOY_RELEASE" >> $GITHUB_ENV
fi
- name: Build with Maven deploy
if: ${{ env.DEPLOY_RELEASE == 'true' }}
run: ./mvnw -Dchangelist= -B deploy site:site site:stage
env:
MAVEN_SERVER_USERNAME: ${{ secrets.MAVEN_SERVER_USERNAME }}
MAVEN_SERVER_PASSWORD: ${{ secrets.MAVEN_SERVER_PASSWORD }}
- name: Create new git tag
uses: rickstaa/action-create-tag@v1
if: ${{ env.DEPLOY_RELEASE == 'true' }}
with:
tag: ${{ env.MAVEN_POM_REVISION_VERSION }}
message: Release ${{ env.MAVEN_POM_REVISION_VERSION }}
run: ./mvnw -Dchangelist= -B install site:site site:stage
- name: Set version output
id: set-version
run: echo "release-version=${MAVEN_POM_REVISION_VERSION}" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit bb97b18

Please sign in to comment.