-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (33 loc) · 952 Bytes
/
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
name: Check and publish
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 8
- name: Run Check
uses: eskatos/gradle-command-action@v1
with:
arguments: detektAll check
wrapper-cache-enabled: true
dependencies-cache-enabled: true
- name: Publish
uses: eskatos/gradle-command-action@v1
if: github.ref == 'refs/heads/main' && success()
with:
arguments: publish
wrapper-cache-enabled: true
dependencies-cache-enabled: true
env:
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }}
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}