From 5334d320a35fbd2f56ef1db0ee0aa76d290efd1c Mon Sep 17 00:00:00 2001 From: nullterminated Date: Wed, 27 Nov 2024 07:26:49 +0900 Subject: [PATCH 1/4] Create maven.yml --- .github/workflows/maven.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000000..474d8c28e5 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,47 @@ +# This workflow will build a Java project 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: Java CI with Maven + +on: + push: + branches: [ "wolips5" ] + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: ./mvnw -B package --file pom.xml + - name: Upload pages artifact + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: wolips/wolips.p2/target/ + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From e9e74d7c275852b3336d13706647d8c376b9bda4 Mon Sep 17 00:00:00 2001 From: nullterminated Date: Wed, 27 Nov 2024 07:40:14 +0900 Subject: [PATCH 2/4] Give token write permissions. --- .github/workflows/maven.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 474d8c28e5..01c0c75ca4 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -40,6 +40,8 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest + permissions: + id-token: write needs: build steps: - name: Deploy to GitHub Pages From 5e4cf02d4f68d23d608b7fdade60ceff112fbf0f Mon Sep 17 00:00:00 2001 From: nullterminated Date: Wed, 27 Nov 2024 07:43:58 +0900 Subject: [PATCH 3/4] Give token permission to write pages too. --- .github/workflows/maven.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 01c0c75ca4..4dd1307193 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -42,6 +42,7 @@ jobs: runs-on: ubuntu-latest permissions: id-token: write + pages: write needs: build steps: - name: Deploy to GitHub Pages From a2a6c4c1b87187c2e81f32665601386cb657ecd2 Mon Sep 17 00:00:00 2001 From: nullterminated Date: Wed, 27 Nov 2024 09:13:59 +0900 Subject: [PATCH 4/4] Rename the action to reflect what it does --- .github/workflows/maven.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 4dd1307193..9a83ceb869 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,12 +1,4 @@ -# This workflow will build a Java project 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: Java CI with Maven +name: Deploy p2 to pages on: push: