forked from atlassian/virtual-users
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.02 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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
release:
description: 'Release? yes/no'
default: 'no'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache Gradle
uses: actions/cache@v2
with:
path: ~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle') }}
- name: Build
run: ./gradlew build
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v2
with:
name: test-reports
path: build/reports/tests
- name: Release
if: github.event.inputs.release == 'yes'
env:
atlassian_private_username: ${{ secrets.ARTIFACTORY_USERNAME }}
atlassian_private_password: ${{ secrets.ARTIFACTORY_API_KEY }}
run: |
./gradlew release -Prelease.customUsername=${{ secrets.REPOSITORY_ACCESS_TOKEN }}
./gradlew publish