Skip to content

Commit

Permalink
Oppdater github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ugur93 committed Jan 9, 2024
1 parent fd286cb commit fe6df84
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 47 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build-deploy-bidrag-domene.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Build-Deploy
name: Bidrag-domene
on:
push:
paths:
- "bidrag-domene/**"
pull_request:
types: [closed]

permissions:
contents: "read"
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build-deploy-bidrag-transport.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Build-Deploy
name: Bidrag-transport
on:
push:
paths:
- "bidrag-transport/**"
pull_request:
types: [closed]

permissions:
contents: "read"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_and_release_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
release:
name: Release package
needs: build-artifact
if: github.base_ref == 'main'
if: github.base_ref == 'main' || github.ref == 'refs/heads/main'
uses: ./.github/workflows/release_package.yml
with:
package-name: ${{inputs.package-name}}
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/release_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ jobs:
export VERSION=${GIT_COMMIT_DATE}
echo "VERSION=${GIT_COMMIT_DATE}" >> $GITHUB_ENV
echo "Setting version $VERSION"
mvn --settings versions:set -DnewVersion="$VERSION" --pl ${{inputs.package-name}} --am
mvn --settings versions:commit --pl ${{inputs.package-name}} --am
git tag -a "${VERSION}" -m "Version ${VERSION}"
git push origin "${VERSION}"
mvn versions:set -DnewVersion="$VERSION" --pl ${{inputs.package-name}} --am
mvn versions:commit --pl ${{inputs.package-name}} --am
- name: Deploy to Github Package
run: |
echo "Release package ${{inputs.package-name}} with version ${{ env.VERSION }}"
# mvn --settings source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false --pl ${{inputs.package-name}} --am
- name: Tag release
run: |
echo "Tag release with version ${{ env.VERSION }}"
git tag -a "${{ env.VERSION }} " -m "Version ${{ env.VERSION }}
git push origin "${{ env.VERSION }}"
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{env.VERSION}}
name: Release ${{env.VERSION}}
50 changes: 21 additions & 29 deletions bidrag-domene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
<swagger.version>2.2.19</swagger.version>
<spring-core.version>6.1.2</spring-core.version>
<jakarta.version>3.1.0</jakarta.version>
</properties>

<distributionManagement>
Expand All @@ -31,37 +33,19 @@
</distributionManagement>

<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit5</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>io.kotest</groupId>
<artifactId>kotest-assertions-core-jvm</artifactId>
<version>${kotest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
<scope>test</scope>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand All @@ -78,25 +62,33 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>6.1.2</version>
<version>${spring-core.version}</version>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>3.1.0</version>
<version>${jakarta.version}</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
<version>2.16.0</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.kotest</groupId>
<artifactId>kotest-assertions-core-jvm</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
Expand Down
2 changes: 1 addition & 1 deletion bidrag-transport/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# bidrag-tranport
Transportobjekter for team bidrag
test
test2
2 changes: 1 addition & 1 deletion bidrag-transport/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<sha1/>
<changelist>-SNAPSHOT</changelist>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>6.1.0</spring.version>
<spring.version>6.1.2</spring.version>
<jakarta.version>3.0.2</jakarta.version>
</properties>

Expand Down

0 comments on commit fe6df84

Please sign in to comment.