Skip to content

Commit

Permalink
Merge pull request #78 from MrSebastian/release-to-github-packages
Browse files Browse the repository at this point in the history
Release to GitHub packages
  • Loading branch information
MrSebastian authored Mar 10, 2024
2 parents 74a65c6 + b59bd6a commit d683847
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 12 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release_main_backend.yml
Original file line number Diff line number Diff line change
@@ -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 }}
26 changes: 26 additions & 0 deletions .github/workflows/release_main_frontend.yml
Original file line number Diff line number Diff line change
@@ -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 }}
20 changes: 14 additions & 6 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
<mapstruct.version>1.5.5.Final</mapstruct.version>
</properties>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/MrSebastian/TodoAppOSSDemo</url>
</repository>
</distributionManagement>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -157,7 +165,7 @@
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
Expand Down Expand Up @@ -350,7 +358,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<argLine>${surefireArgLine} -Dfile.encoding=${project.build.sourceEncoding}</argLine>
<argLine>${surefireArgLine} -Dfile.encoding=${project.build.sourceEncoding}</argLine>
</configuration>
</plugin>

Expand All @@ -370,10 +378,10 @@
<goal>prepare-agent</goal>
</goals>
<configuration>
<append>true</append>
<destFile>${sonar.jacoco.reportPath}</destFile>
<!-- Sets the VM argument line used when unit tests are run. -->
<propertyName>surefireArgLine</propertyName>
<append>true</append>
<destFile>${sonar.jacoco.reportPath}</destFile>
<!-- Sets the VM argument line used when unit tests are run. -->
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<execution>
Expand Down
20 changes: 14 additions & 6 deletions frontend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@


<properties>
<!-- SonarQube -->
<sonar.scanner.version>3.9.0.2155</sonar.scanner.version>
<!-- SonarQube -->
<sonar.scanner.version>3.9.0.2155</sonar.scanner.version>
</properties>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/MrSebastian/TodoAppOSSDemo</url>
</repository>
</distributionManagement>


<build>
<pluginManagement>
Expand All @@ -42,10 +50,10 @@
</configuration>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar.scanner.version}</version>
</plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar.scanner.version}</version>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit d683847

Please sign in to comment.