Skip to content

Commit bef1a19

Browse files
author
xtex
committed
feat(ci): add actions
1 parent bf370b3 commit bef1a19

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Diff for: .github/workflows/build.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
release:
8+
types:
9+
- created
10+
11+
jobs:
12+
build:
13+
name: Build
14+
strategy:
15+
fail-fast: false
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Setup Java
21+
uses: actions/[email protected]
22+
with:
23+
java-version: 11
24+
distribution: adopt
25+
cache: gradle
26+
27+
- name: Build with Gradle
28+
run: |
29+
chmod +x ./gradlew
30+
./gradlew build
31+
32+
- name: Upload Artifact
33+
uses: actions/[email protected]
34+
with:
35+
path: build/libs/*.jar
36+
37+
- name: Upload Release
38+
uses: fnkr/github-action-ghr@v1
39+
if: github.event_name == 'release'
40+
env:
41+
GHR_PATH: build/libs/
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)