diff --git a/.github/workflows/release_main_backend.yml b/.github/workflows/release_main_backend.yml new file mode 100644 index 00000000..f81f07c2 --- /dev/null +++ b/.github/workflows/release_main_backend.yml @@ -0,0 +1,26 @@ +name: Publish backend package to GitHub Packages +on: + push: + branches: + - 'main' + release: + types: [ created ] +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Publish package + run: mvn --batch-mode -f backend/pom.xml deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release_main_frontend.yml b/.github/workflows/release_main_frontend.yml new file mode 100644 index 00000000..fc26d691 --- /dev/null +++ b/.github/workflows/release_main_frontend.yml @@ -0,0 +1,26 @@ +name: Publish frontend package to GitHub Packages +on: + push: + branches: + - 'main' + release: + types: [ created ] +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Publish package + run: mvn --batch-mode -f frontend/pom.xml deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/backend/pom.xml b/backend/pom.xml index 53c49840..14a76471 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -39,6 +39,14 @@ 1.5.5.Final + + + github + GitHub Packages + https://maven.pkg.github.com/MrSebastian/TodoAppOSSDemo + + + @@ -157,7 +165,7 @@ org.hibernate.orm hibernate-core - + org.flywaydb flyway-core @@ -350,7 +358,7 @@ maven-surefire-plugin ${maven-surefire-plugin.version} - ${surefireArgLine} -Dfile.encoding=${project.build.sourceEncoding} + ${surefireArgLine} -Dfile.encoding=${project.build.sourceEncoding} @@ -370,10 +378,10 @@ prepare-agent - true - ${sonar.jacoco.reportPath} - - surefireArgLine + true + ${sonar.jacoco.reportPath} + + surefireArgLine diff --git a/frontend/pom.xml b/frontend/pom.xml index cd05872b..b17ba542 100644 --- a/frontend/pom.xml +++ b/frontend/pom.xml @@ -13,10 +13,18 @@ - - 3.9.0.2155 + + 3.9.0.2155 + + + github + GitHub Packages + https://maven.pkg.github.com/MrSebastian/TodoAppOSSDemo + + + @@ -42,10 +50,10 @@ - org.sonarsource.scanner.maven - sonar-maven-plugin - ${sonar.scanner.version} - + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar.scanner.version} +