-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.26 KB
/
buildMapster.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
name: build
on: [ push, pull_request ]
jobs:
build_deploy:
#if conditional to prevent a job from running
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
name: deploy release
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: fwilhe2/setup-kotlin@main
- name: gradle wrapper --gradle-version 6.7 --distribution-type all
run: gradle wrapper
# This action will create a github release and optionally upload an artifact to it.
# https://github.com/ncipollo/release-action
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Gradle Test
run: ./gradlew test
- name: Gradle Build
run: ./gradlew build
- name: publish new version to github package
run: ./gradlew publish
env:
GPR_USER: ${{ secrets.GPR_USER }}
GPR_KEY: ${{ secrets.GPR_KEY }}
continue-on-error: true
- name: Create a Release JAR
uses: ncipollo/release-action@v1
with:
artifacts: build/libs/*.jar
commit: ${{ github.sha }}
token: ${{ secrets.COMMIT_TOKEN }}
continue-on-error: true