Skip to content

Commit d06994e

Browse files
authored
Add GitHub Actions workflow to build JAR file
1 parent 72b1243 commit d06994e

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/build-jar.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build Robot Code
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*']
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Java 17
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: temurin
21+
java-version: 17
22+
23+
- name: Setup Gradle
24+
uses: gradle/actions/setup-gradle@v4
25+
26+
- name: Build JAR
27+
run: ./gradlew jar
28+
29+
- name: Upload JAR as workflow artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: robot-jar
33+
path: build/libs/*.jar
34+
35+
- name: Create release
36+
if: startsWith(github.ref, 'refs/tags/v')
37+
uses: softprops/action-gh-release@v2
38+
with:
39+
files: build/libs/*.jar

0 commit comments

Comments
 (0)