-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (102 loc) · 3 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Compose Desktop Build
env:
GITHUB_DEPLOY: 'false'
on:
push:
branches:
- master
tags:
- '*'
paths-ignore:
- LICENSE
- README.md
- 'docs/**'
- '.github/config/labels.yml'
pull_request:
branches:
- main
workflow_dispatch:
repository_dispatch:
types: [ app-release ]
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Package
timeout-minutes: 15
continue-on-error: true
# if: github.event_name == 'pull_request'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
jdk: [ 18 ]
steps:
- name: Check out the source code
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 18
- name: Cache Gradle dependencies
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: current
arguments: ":svgconverter:packageDistributionForCurrentOS"
- name: Upload ${{ matrix.os }} Build
uses: actions/upload-artifact@v2
with:
name: macos-build
path: |
build/compose/binaries/main/dmg/*.dmg
build/compose/binaries/main/deb/*.deb
build/compose/binaries/main/msi/*.msi
# - name: Gradle Build
# id: gradle-build
# run: ./gradlew createDistributable
# - name: Archive Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: distributable-${{ matrix.os }}
# if-no-files-found: ignore
# path: |
# build/compose/binaries/main/app/
release:
name: Release new version
needs: [ build ]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Check out the source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download all the build artifacts
uses: actions/download-artifact@v3
with:
path: release-artifacts
- name: Github Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.github_release.outputs.changelog }}
prerelease: ${{ contains(github.event.inputs.version, '-rc') || contains(github.event.inputs.version, '-b') || contains(github.event.inputs.version, '-a') }}
files: |
${{ github.workspace }}/release-artifacts/**
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}