Skip to content

Commit 20acca7

Browse files
committed
Add github release workflow
1 parent 8b11151 commit 20acca7

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

.github/workflows/releases.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release JAR
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
env:
13+
JAVA_VERSION: 16
14+
15+
jobs:
16+
17+
release:
18+
name: Build and release
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Set up JDK
22+
uses: actions/setup-java@v1
23+
with:
24+
java-version: ${{ env.JAVA_VERSION }}
25+
26+
- uses: actions/checkout@v2
27+
28+
- name: Build shadow jar
29+
run: ./gradlew shadowJar
30+
31+
- name: Create release
32+
uses: softprops/action-gh-release@v1
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
files: application/build/libs/TJ-Bot.jar

application/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ tasks.generateJooq {
8989
dependsOn("flywayMigrate")
9090
}
9191

92-
application {
93-
mainClass = "org.togetherjava.tjbot.Application"
94-
}
95-
9692
shadowJar {
9793
archiveBaseName.set('TJ-Bot')
9894
archiveClassifier.set('')

0 commit comments

Comments
 (0)