-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.46 KB
/
continuous_integration.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
name: CI
on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Caches Gradle dependencies and wrappers
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper/dists
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', '**/libs.versions.toml', '**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run cibuild script
id: exec
run: ./scripts/cibuild
- name: Cleanup Gradle Cache
run: |
sudo rm -f ~/.gradle/caches/modules-2/modules-2.lock
sudo rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Rename build files
run: |
pushd build/libs
cp ${{ steps.exec.outputs.slimjar }} NiSCore-SLIM.jar
cp ${{ steps.exec.outputs.libstar }} NiSCore-libs.tar.gz
cp ${{ steps.exec.outputs.fatjar }} NiSCore-FAT.jar
popd
- name: Create release if this is a tagged workflow
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
artifacts: build/libs/NiSCore-SLIM.jar,build/libs/NiSCore-libs.tar.gz,build/libs/NiSCore-FAT.jar
name: NiSCore ${{ steps.exec.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}