Skip to content

Commit

Permalink
Create Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hdpe committed Oct 23, 2023
1 parent c3f9028 commit fbe7ef8
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'

- name: Build with Maven
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
if [[ "$GITHUB_REF" =~ ^refs/tags/ ]]; then
PHASES="install site"
elif [[ "$GITHUB_REF" = "refs/heads/main" ]]; then
PHASES="deploy"
else
PHASES="verify"
fi
mvn -B -s config/settings.ci.xml $PHASES -PrunITs
- name: Report code coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: mvn -B test jacoco:report coveralls:report -pl :bowman-client

- uses: actions/upload-pages-artifact@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
path: client/target/generated-docs

deploy-pages:
if: ${{ startsWith(github.ref, 'refs/tags/') }}

needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit fbe7ef8

Please sign in to comment.