diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd77cae..a4d5bd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,13 +2,13 @@ name: ci on: push: - branches: [main] + branches: [main, develop] pull_request: - branches: [main] + branches: [main, develop] jobs: test: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 @@ -19,4 +19,5 @@ jobs: java-version: "25" cache: maven - - run: mvn -B test \ No newline at end of file + - working-directory: helpmehelpapplication + run: mvn -B test diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml new file mode 100644 index 0000000..4a20d1a --- /dev/null +++ b/.github/workflows/maven-publish.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: Maven Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: [ self-hosted ] + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/README.md b/README.md index c2b4d1f..8ee4bba 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Consists of: Cathrine Kristiansen, Adrian Balunan, Roar Fagerkind, Robin Prestmo - Team number: `6` - Team members: - - Robin Prestmo - Product Owner + - Robin Strand Prestmo - Product Owner - Adrian Balunan - Scrum Master - Cathrine Kristiansen - Archive and Document Responsible - Roar Fagerkind - Software Quality Responsible