Skip to content

Commit 00bd258

Browse files
committed
add Gradle Release plugin
1 parent f4f6629 commit 00bd258

File tree

4 files changed

+52
-2
lines changed

4 files changed

+52
-2
lines changed

.github/workflows/backend.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ jobs:
2626
- name: Build
2727
run: ./gradlew :backend:clean :backend:build
2828

29-
# Insert docker build and push steps here
30-
3129
- name: Generate summary
3230
run: |
3331
echo "Tag: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Cupcake Backend
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
push:
10+
name: "Build Cupcake backend - release"
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Set up JDK
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '22'
21+
distribution: 'temurin'
22+
23+
- name: Setup Gradle
24+
uses: gradle/actions/setup-gradle@v4
25+
26+
- name: Build
27+
run: ./gradlew :backend:clean :backend:build
28+
29+
30+
- name: Generate summary
31+
run: |
32+
echo "Tag: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
33+
34+
- name: Upload reports if failed
35+
if: failure()
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: search-reports
39+
path: |
40+
**/build/reports/
41+
**/build/test-results/
42+
43+
- name: Upload coverage if passed
44+
if: success()
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: search-coverage
48+
path: |
49+
**/build/reports/jacoco/

backend/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ plugins {
66
alias(libs.plugins.versions)
77
alias(libs.plugins.serialization)
88
alias(libs.plugins.dependency.analysis)
9+
alias(libs.plugins.release)
910
jacoco
1011
}
1112

gradle/libs.versions.toml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ktor-version = "3.1.1"
1414
logback-version = "1.5.17"
1515
prometheus-version = "1.14.5"
1616
serialization-version = "2.1.10"
17+
release_version = "3.1.0"
1718

1819
[libraries]
1920
arrow-core = { group = "io.arrow-kt", name = "arrow-core", version.ref = "arrow_version" }
@@ -69,3 +70,4 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-version" }
6970
ktor = { id = "io.ktor.plugin", version.ref = "ktor-version" }
7071
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "serialization-version" }
7172
versions = { id = "se.ascp.gradle.gradle-versions-filter", version.ref = "gradle-versions_filter-version" }
73+
release = { id = "net.researchgate.release", version.ref = "release_version" }

0 commit comments

Comments
 (0)