From f3fefd1ae509866ce8b6d5ecd4231da6d21a95e2 Mon Sep 17 00:00:00 2001 From: Simon Templer Date: Tue, 12 Mar 2024 15:48:32 +0100 Subject: [PATCH] ci: add GitHub Actions workflows for build and publishing --- .github/workflows/check.yml | 30 +++++++++++++++++++++++++++++ .github/workflows/publish.yml | 36 +++++++++++++++++++++++++++++++++++ version.txt | 1 + 3 files changed, 67 insertions(+) create mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/publish.yml create mode 100644 version.txt diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..a610e6e --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,30 @@ +name: Check + +on: + pull_request: + branches: [ master ] + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - name: Setup Maven + uses: s4u/setup-maven-action@v1.7.0 + with: + java-version: 8 + java-distribution: temurin + maven-version: 3.6.3 + + - name: Maven + # Additional args to work around Github Runner issue (on Azure) + # see https://github.com/actions/runner-images/issues/1499#issuecomment-689467080 + run: mvn clean install -Dmaven.test.failure.ignore=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=60 + + # https://github.com/marketplace/actions/junit-report-action + # Note: Currently no tests + # - name: Publish Test Report + # uses: mikepenz/action-junit-report@v3 + # if: always() # always run even if the previous step fails + # with: + # report_paths: '*/target/surefire-reports/*.xml' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b935bcd --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,36 @@ +name: Publish + +on: + push: + branches: [ master ] + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Setup Maven + uses: s4u/setup-maven-action@v1.7.0 + with: + java-version: 8 + java-distribution: temurin + maven-version: 3.6.3 + + - name: Maven + # Additional args to work around Github Runner issue (on Azure) + # see https://github.com/actions/runner-images/issues/1499#issuecomment-689467080 + run: mvn clean install -Dmaven.test.failure.ignore=true -Dmaven.wagon.httpconnectionManager.ttlSeconds=60 + + - name: Install AWS CLI + uses: unfor19/install-aws-cli-action@v1 + with: + version: 1 + + - name: Upload + env: + AWS_ACCESS_KEY_ID: ${{ secrets.BUILD_ARCHIVE_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.BUILD_ARCHIVE_SECRET_KEY }} + run: | + VERSION=$(cat version.txt | head -1) + aws s3 sync de.fhg.igd.equinox.test.site/target/repository/ s3://build-artifacts.wetransform.to/p2/equinox-test/$VERSION --acl public-read --delete --region eu-central-1 + shell: bash diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..62623e1 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.2.0.20240312