From 239a6ce1c546a1f277cd572eb3caae758a3cc81e Mon Sep 17 00:00:00 2001 From: Mads Opheim Date: Fri, 6 Sep 2024 13:54:29 +0200 Subject: [PATCH] =?UTF-8?q?Skriv=20om=20ogs=C3=A5=20byggejobbane?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 16 ++++++++++++---- .github/workflows/codeql.yml | 7 +++++-- .github/workflows/releaseGithub.yml | 14 +++++++++----- README.md | 2 +- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c80d585..4eb0f9a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: CI on: push jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-8-cores steps: - uses: actions/checkout@v4 - name: Set up Java @@ -11,6 +11,14 @@ jobs: with: distribution: temurin java-version: 21 - cache: maven - - name: Build with Maven - run: mvn -B install + - name: Inject slug/short variables + uses: rlespinasse/github-slug-action@v4 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + with: + cache-encryption-key: ${{ secrets.gradlekey }} + dependency-graph: generate-and-submit + - name: Gradle test and build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./gradlew :apps:${{ github.workflow }}:build --configuration-cache \ No newline at end of file diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7534200..563d7d6 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -33,8 +33,11 @@ jobs: distribution: temurin java-version: 21 - - name: Build with Maven - run: mvn -B install + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Assemble + run: ./gradlew assemble -Dorg.gradle.jvmargs="-Dkotlin.daemon.jvmargs=-Xmx16g" --configuration-cache env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/releaseGithub.yml b/.github/workflows/releaseGithub.yml index 73423fb..4bd3bbb 100644 --- a/.github/workflows/releaseGithub.yml +++ b/.github/workflows/releaseGithub.yml @@ -8,7 +8,7 @@ on: jobs: release: name: Create Release - runs-on: ubuntu-latest + runs-on: ubuntu-latest-8-cores permissions: contents: write packages: write @@ -34,15 +34,19 @@ jobs: with: distribution: temurin java-version: 21 - cache: maven + - name: Inject slug/short variables + uses: rlespinasse/github-slug-action@v4 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + with: + cache-encryption-key: ${{ secrets.gradlekey }} + dependency-graph: generate-and-submit - name: Deploy artifacts to github maven repository env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - mvn -B versions:set -DnewVersion="$RELEASE_TAG" - mvn -B versions:commit echo "Running release" - mvn -B --settings maven-settings.xml deploy -Dmaven.wagon.http.pool=false + gradle -Pversion="$RELEASE_TAG" publish - name: Create Release id: create_release diff --git a/README.md b/README.md index b361122..697b54f 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ dependencies { ## Bygging Koden bruker Jakarta-navnerommet, og forutsetter Java nyere enn 8. -`mvn install` +`gradle build` ## Gjøre endringer, release