From af4556d9269b9e5fe3d246530b0be5e3dcd972e8 Mon Sep 17 00:00:00 2001 From: Oleh Astappiev Date: Thu, 21 Sep 2023 23:59:59 +0200 Subject: [PATCH] chore: add dependabot, client repository --- .github/dependabot.yml | 21 +++++++++++++++++ .github/workflows/publish-client.yml | 34 ++++++++++++++++++++++++++++ .github/workflows/test.yml | 12 +++------- pom.xml | 8 +++++++ 4 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/publish-client.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..1a1a71ac --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "weekly" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/publish-client.yml b/.github/workflows/publish-client.yml new file mode 100644 index 00000000..60498ce9 --- /dev/null +++ b/.github/workflows/publish-client.yml @@ -0,0 +1,34 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: publish-client + +on: + workflow_dispatch: + push: + branches: [ main ] + +permissions: + contents: read + packages: write + +jobs: + deploy-client: + if: github.event.head_commit.message == 'chore(client):: version release' + runs-on: ubuntu-latest + env: + MVN: mvn --show-version --batch-mode + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: 'maven' + + - name: Publish to GitHub Packages Apache Maven + run: $MVN -pl interweb-client deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b366ac85..4579a532 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,19 +10,13 @@ jobs: env: MVN: mvn --show-version --batch-mode steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' - - - uses: actions/checkout@v4 - - - name: cache ~/.m2 - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 + cache: 'maven' - name: run compile run: $MVN clean compile diff --git a/pom.xml b/pom.xml index 3f874ffc..59416433 100644 --- a/pom.xml +++ b/pom.xml @@ -49,6 +49,14 @@ connectors/YouTubeConnector + + + github + Learnweb GitHub Packages + https://maven.pkg.github.com/l3s-learnweb/learnweb + + +