-
-
Notifications
You must be signed in to change notification settings - Fork 54
56 lines (46 loc) · 1.58 KB
/
build-linux.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
56
name: Build [Linux]
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.draft == false && (github.event_name == 'workflow_dispatch' || !contains(github.event.head_commit.message, 'noci')) }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDKs
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: |
22
21
- name: Set up Gradle
uses: gradle/gradle-build-action@v3
- name: Build tarball
run: ./gradlew desktopApp:packageReleaseTarball
- name: Upload tarball artifact
uses: actions/upload-artifact@v3
with:
name: spmp-linux-release
path: desktopApp/build/outputs/*.tar.gz
- name: Rename output file
run: mv desktopApp/build/outputs/*.tar.gz desktopApp/build/outputs/spmp-nightly-linux-x86_64.tar.gz
- name: Get current date and time
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S')"
- name: Update nightly release
uses: mini-bomba/[email protected]
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: nightly-latest
name: Nightly ${{ steps.date.outputs.date }}
files: desktopApp/build/outputs/spmp-nightly-linux-x86_64.tar.gz
clear_attachments: false