diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml new file mode 100644 index 00000000..c4984f73 --- /dev/null +++ b/.github/workflows/build_nightly.yml @@ -0,0 +1,65 @@ +# +# Copyright (c) 2018-2023 TNO and Contributors to the GitHub community +# +# This program and the accompanying materials are made available +# under the terms of the MIT License which is available at +# https://opensource.org/licenses/MIT +# +# SPDX-License-Identifier: MIT +# + +# This workflow will build PPS with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Build and Test PPS (Nightly) + +on: + push: + branches: [ "develop" ] + +jobs: + build: + runs-on: ubuntu-latest + env: + MAVEN_OPTS: --add-opens java.base/java.lang=ALL-UNNAMED + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Maven Action + uses: s4u/setup-maven-action@v1.18.0 + with: + java-version: 21 + java-distribution: temurin + - name: Build and Test with Maven + run: mvn verify --batch-mode --update-snapshots --fail-at-end --file pom.xml -Dpps.version.qualifier=$(./versionQualifier.sh) + - name: Attach Test Report + if: success() || failure() + uses: scacap/action-surefire-report@v1 + - name: Attach Website + uses: actions/upload-artifact@v7 + with: + name: PPS-website + path: releng/nl.esi.pps.website/target/website + retention-days: 5 + - name: Attach Update-Site + uses: actions/upload-artifact@v7 + with: + name: PPS-update-site + path: products/nl.esi.pps.product/target/repository + retention-days: 5 + + # Deploy P2 Repository to GitHub Pages for nightly builds + - name: Deploy P2 Repository (Nightly) + if: success() + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./products/nl.esi.pps.product/target/repository + destination_dir: update-site/nightly + keep_files: false diff --git a/.github/workflows/build_main.yml b/.github/workflows/build_pull_request.yml similarity index 78% rename from .github/workflows/build_main.yml rename to .github/workflows/build_pull_request.yml index b9fd5088..cee59922 100644 --- a/.github/workflows/build_main.yml +++ b/.github/workflows/build_pull_request.yml @@ -16,18 +16,17 @@ # separate terms of service, privacy policy, and support # documentation. -name: Build and Test PPS +name: Build and Test PPS (Pull Request) on: - push: - branches: [ "main" ] pull_request: - branches: [ "main" ] + branches: [ "main", "develop" ] jobs: build: - runs-on: ubuntu-latest + env: + MAVEN_OPTS: --add-opens java.base/java.lang=ALL-UNNAMED steps: - name: Checkout @@ -43,8 +42,14 @@ jobs: if: success() || failure() uses: scacap/action-surefire-report@v1 - name: Attach Website - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: PPS-website path: releng/nl.esi.pps.website/target/website retention-days: 5 + - name: Attach Update-Site + uses: actions/upload-artifact@v7 + with: + name: PPS-update-site + path: products/nl.esi.pps.product/target/repository + retention-days: 5 diff --git a/.github/workflows/build_tag.yml b/.github/workflows/build_release.yml similarity index 74% rename from .github/workflows/build_tag.yml rename to .github/workflows/build_release.yml index 965b7d13..cc33aef3 100644 --- a/.github/workflows/build_tag.yml +++ b/.github/workflows/build_release.yml @@ -16,19 +16,19 @@ # separate terms of service, privacy policy, and support # documentation. -name: Build and Test PPS +name: Build and Test PPS (Release) on: push: tags: - - "v*" + - "v*.*.*" jobs: build: - runs-on: ubuntu-latest env: MAVEN_OPTS: --add-opens java.base/java.lang=ALL-UNNAMED + steps: - name: Checkout uses: actions/checkout@v4 @@ -47,4 +47,15 @@ jobs: with: files: | products/nl.esi.pps.product/target/products/pps-*.zip - releng/nl.esi.pps.website/target/pps-*.zip \ No newline at end of file + products/nl.esi.pps.product/target/pps-*.zip + releng/nl.esi.pps.website/target/pps-*.zip + + # Deploy P2 Repository to GitHub Pages for nightly builds + - name: Deploy P2 Repository (Release) + if: success() + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./products/nl.esi.pps.product/target/repository + destination_dir: update-site/${{ github.ref_name }} + keep_files: true diff --git a/releng/nl.esi.pps.target/nl.esi.pps.target.target b/releng/nl.esi.pps.target/nl.esi.pps.target.target index d5bd855b..c733fab0 100644 --- a/releng/nl.esi.pps.target/nl.esi.pps.target.target +++ b/releng/nl.esi.pps.target/nl.esi.pps.target.target @@ -1,6 +1,6 @@ - + @@ -164,7 +164,7 @@ - + diff --git a/releng/nl.esi.pps.website/pom.xml b/releng/nl.esi.pps.website/pom.xml index bffc99ca..3d436a02 100644 --- a/releng/nl.esi.pps.website/pom.xml +++ b/releng/nl.esi.pps.website/pom.xml @@ -45,13 +45,6 @@ website zip - - - ${project.groupId} - nl.esi.pps.product - ${project.version} - zip - @@ -127,24 +120,6 @@ ${project.build.directory}/website/developerguide - - unpack-update-site - prepare-package - - unpack - - - - - ${project.groupId} - nl.esi.pps.product - ${project.version} - zip - - - ${project.build.directory}/website/update-site/${pps.version.enduser} - -