This repository has been archived by the owner on Feb 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 297
51 lines (48 loc) · 1.86 KB
/
build-publish.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
# Making changes? https://github.com/nektos/act may help you test locally
name: Build And Test
on: [push, pull_request]
jobs:
build:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.repository.full_name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Check out
uses: actions/checkout@v2
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle
run: ./gradlew build
- name: Archive test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: |
build/test-results/test/
*/build/test-results/test/
platform/*/build/test-results/test
- name: Archive distributable plugins
uses: actions/upload-artifact@v2
if: ${{ runner.os == 'Linux' }} # Only upload one set of artifacts
with:
name: PermissionsEx (all platforms)
path: build/libs/
- name: Publish to Maven
if: ${{ runner.os == 'Linux' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_pexUsername: ${{ secrets.REPO_USERNAME }}
ORG_GRADLE_PROJECT_pexPassword: ${{ secrets.REPO_PASSWORD }}
ORG_GRADLE_PROJECT_stellardriftUsername: ${{ secrets.STELLARDRIFT_REPO_USER }}
ORG_GRADLE_PROJECT_stellardriftPassword: ${{ secrets.STELLARDRIFT_REPO_PASSWORD }}