forked from oversecured/ovaa
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (52 loc) · 1.67 KB
/
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
47
48
49
50
51
52
53
54
name: CI
on:
pull_request:
branches: ['**']
push:
branches: ['**']
tags: [v*]
jobs:
build-gradle:
name: Build
# Run on external PRs, but not on internal PRs since those will be run by push to branch
# if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '14'
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle Wrapper
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: build
# publish-to-github-packages:
# name: Publish to Github Packages
# needs: [build-gradle]
# # Runs only in main
# if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
# steps:
# - name: Checkout project sources
# uses: actions/checkout@v3
# - uses: actions/setup-java@v3
# with:
# distribution: 'temurin'
# java-version: '17'
# - name: Validate Gradle Wrapper
# uses: gradle/wrapper-validation-action@v1
# - name: Publish with Gradle Wrapper
# uses: gradle/gradle-build-action@v2
# with:
# arguments: publish
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PUBLISH_MVN_REPO: https://maven.pkg.github.com/${{ github.repository }}