Skip to content

Commit

Permalink
rename parent package
Browse files Browse the repository at this point in the history
  • Loading branch information
querwurzel committed Oct 22, 2023
1 parent 21e19e0 commit fb3b6e0
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 15 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build

on:
workflow_dispatch:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Build with Maven
run: mvn clean package
28 changes: 19 additions & 9 deletions .github/workflows/main.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI
name: release

on: [push]
on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
Expand All @@ -15,20 +19,26 @@ jobs:
distribution: 'temurin'
java-version: '17'

- name: Build with Maven
run: mvn clean package

- name: Publish package [on main]
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn deploy -DskipTests -Denv=mysql
mvn deploy -DskipTests -Drevision=1.0.${{ github.run_number }} -Denv=mysql
- uses: actions/delete-package-versions@v4
with:
package-name: 'com.github.binpastes.app'
package-type: 'maven'
min-versions-to-keep: 10
- uses: actions/delete-package-versions@v4
if: github.ref == 'refs/heads/main'
with:
package-name: 'com.github.binpastes.frontend'
package-type: 'maven'
min-versions-to-keep: 10
- uses: actions/delete-package-versions@v4
if: github.ref == 'refs/heads/main'
with:
package-name: 'com.github.binpastes.binpastes'
package-name: 'com.github.binpastes.backend'
package-type: 'maven'
min-versions-to-keep: 10
ignore-versions: '1.0.0-SNAPSHOT'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
pom.xml.versionsBackup

### STS ###
.apt_generated
Expand Down
5 changes: 3 additions & 2 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<parent>
<groupId>com.github.binpastes</groupId>
<artifactId>binpastes</artifactId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>app</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -17,6 +17,7 @@
<dependency>
<groupId>com.github.binpastes</groupId>
<artifactId>frontend</artifactId>
<version>${revision}</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions frontend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<parent>
<groupId>com.github.binpastes</groupId>
<artifactId>binpastes</artifactId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>app</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</parent>

<groupId>com.github.binpastes</groupId>
<artifactId>binpastes</artifactId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>app</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
<name>BinPastes</name>

Expand All @@ -31,6 +31,7 @@
<properties>
<!-- maven property definition -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revision>1.0.0-SNAPSHOT</revision>

<!-- java version properties -->
<maven.compiler.target>17</maven.compiler.target>
Expand Down

0 comments on commit fb3b6e0

Please sign in to comment.