-
-
Notifications
You must be signed in to change notification settings - Fork 149
55 lines (53 loc) · 1.73 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
on: [push, pull_request]
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '20'
distribution: 'zulu'
- name: Install Linux dependencies
run: sudo apt-get install libplist-dev libimobiledevice-dev libirecovery-1.0-dev
if: runner.os == 'Linux'
- name: Gradle build
uses: gradle/gradle-build-action@v2
with:
arguments: build --no-daemon --scan
- uses: initdc/upload-artifact@feat/artifact-per-file
with:
artifact-per-file: true
artifact-name-rule: ${{ runner.os }}${ext}
path: build/distributions/*
- name: Upload reports on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: failure-${{ runner.os }}
path: build/reports/
release:
name: Create public releases
runs-on: ubuntu-latest
needs: build
if: "startsWith(github.event.head_commit.message, 'Release')"
steps:
- name: Get artifacts
uses: actions/download-artifact@v3
- name: Get version from commit
run: echo "VERSION=$(echo ${{ github.event.commits[0].message }} | awk '{print $2}')" >> $GITHUB_ENV
- name: Release public builds
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.VERSION }}"
prerelease: false
draft: true
files: "**"