From 9d29e8bff2ee50430a00d601a3d50e12b646e910 Mon Sep 17 00:00:00 2001 From: Philipp Dolif Date: Fri, 1 Jul 2022 12:53:38 +0200 Subject: [PATCH 1/4] Add Dependabot #2 --- .github/dependabot.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..98d6dbd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 +updates: + - package-ecosystem: "gradle" + directory: "/lib" + target-branch: "develop" + schedule: + interval: "daily" + time: "09:00" + timezone: "Europe/Berlin" \ No newline at end of file From df9674a8648ed3095a688431055dd08caeef87f4 Mon Sep 17 00:00:00 2001 From: Philipp Dolif Date: Fri, 1 Jul 2022 13:00:41 +0200 Subject: [PATCH 2/4] Add Java CI #3 --- .github/workflows/gradle.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/gradle.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..ba2e5bc --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,21 @@ +name: Java CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'adopt' + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b + - name: Build with Gradle + uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee + with: + arguments: build \ No newline at end of file From adc35b909f923304859e7f6eead54c416fe8ebde Mon Sep 17 00:00:00 2001 From: Philipp Dolif Date: Fri, 1 Jul 2022 13:05:38 +0200 Subject: [PATCH 3/4] Grant execute permission for gradlew #3 --- .github/workflows/gradle.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ba2e5bc..6c68ae3 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -13,6 +13,8 @@ jobs: with: java-version: '17' distribution: 'adopt' + - name: Grant execute permission for gradlew + run: chmod +x gradlew - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b - name: Build with Gradle From d45889ff140214d2505b1b9194cf04212c957537 Mon Sep 17 00:00:00 2001 From: Philipp Dolif Date: Fri, 1 Jul 2022 13:13:03 +0200 Subject: [PATCH 4/4] Add publish-workflow #3 --- .github/workflows/gradle-publish.yml | 26 ++++++++++++++++++++++++++ lib/build.gradle | 14 ++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/gradle-publish.yml diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml new file mode 100644 index 0000000..27e312e --- /dev/null +++ b/.github/workflows/gradle-publish.yml @@ -0,0 +1,26 @@ +name: Publish package to GitHub Packages +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'adopt' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b + - name: Publish package + uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee + with: + arguments: publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/lib/build.gradle b/lib/build.gradle index 21aee66..3494b07 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -1,6 +1,7 @@ plugins { // Apply the java-library plugin for API and implementation separation. id 'java-library' + id 'maven-publish' } repositories { @@ -15,3 +16,16 @@ dependencies { implementation 'com.googlecode.json-simple:json-simple:1.1.1' implementation 'javax.xml.bind:jaxb-api:2.3.1' } + +publishing { + repositories { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/rwth-acis/las2peer-api-test-model" + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } +} \ No newline at end of file