Skip to content

Commit bfe3e34

Browse files
committed
Add release workflow
1 parent 8c7e5aa commit bfe3e34

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
github-release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Cache
13+
uses: actions/cache@v2
14+
with:
15+
path: |
16+
~/.gradle/loom-cache
17+
~/.gradle/caches
18+
~/.gradle/wrapper
19+
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
20+
restore-keys: |
21+
gradle-
22+
23+
- name: Checkout repository
24+
uses: actions/checkout@v2
25+
26+
- name: Setup JDK 17
27+
uses: actions/setup-java@v1
28+
with:
29+
java-version: 17
30+
31+
- name: Ensure gradlew is executable
32+
run: chmod +x gradlew
33+
34+
- name: Build mod
35+
run: ./gradlew build
36+
37+
- name: Upload GitHub release
38+
uses: AButler/[email protected]
39+
with:
40+
files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar'
41+
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)