-
-
Notifications
You must be signed in to change notification settings - Fork 19
46 lines (39 loc) · 1.41 KB
/
release_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Create GitHub release(s)
on:
push:
branches: [ master, dev ]
tags: 'v*'
jobs:
build-and-release:
if: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref != 'ref/heads/master' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '13'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build release shadow jar with Gradle
run: ./gradlew -Penv=release shadowJar -x test
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Build dev shadow jar with Gradle
run: |
SHA_SHORT="$(git rev-parse --short HEAD)"
./gradlew -Phash=$SHA_SHORT shadowJar -x test
if: ${{ !startsWith(github.ref, 'refs/tags/v') && github.ref != 'refs/heads/master' }}
- uses: pyTooling/Actions/releaser@r0
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: 'Dev'
rm: true
files: |
EOCV-Sim/build/libs/*.jar
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/v')}}
- uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: 'EOCV-Sim/build/libs/*.jar'