Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release to GitHub packages #78

Merged
merged 3 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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