-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·48 lines (41 loc) · 1.29 KB
/
main.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
47
48
name: Publish Yo Fw package to GitHub Packages
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-20.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Cache Gradle Packages
uses: actions/cache@v2
env:
cache-name: cache-gradle-packages
with:
# gradle cache & wrapper files are stored in `~/.gradle` on Linux/macOS
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/build.gradle') }}
- uses: actions/setup-java@v2
with:
java-version: '15'
distribution: 'adopt-openj9'
- name: Compiles the production code
run: ./gradlew clean compile
- name: Runs all tests code
run: ./gradlew test
- name: Runs detekt check for static code analysis
run: ./gradlew detekt
- name: Publish to maven local cache
run: ./gradlew localPublish
# - name: Publish package to GPR
# run: ./gradlew publish
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}