-
Notifications
You must be signed in to change notification settings - Fork 3
156 lines (139 loc) · 4.76 KB
/
release.v2.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Release V2
on:
push:
tags:
- "*.*.*"
env:
file-name: s2c
jobs:
create-release-binaries:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Prepares environment for building
uses: ./.github/actions/setup
- name: Prepare nodeJS enviroment for integrity check
uses: ./.github/actions/setup-nodejs
with:
os: ${{ matrix.os }}
- name: Cache Kotlin Konan
id: cache-kotlin-konan
uses: actions/cache@v4
with:
path: |
~/.konan/**/*
key: kotlin-konan-${{ matrix.os }}
- name: Build Native Binary for macos
if: matrix.os == 'macos-latest'
uses: burrunan/gradle-cache-action@v2
with:
gradle-version: wrapper
job-id: ${{ matrix.os }}
arguments: releaseMacOS
- name: Build Native Binary for Windows
if: matrix.os == 'windows-latest'
uses: burrunan/gradle-cache-action@v2
with:
gradle-version: wrapper
job-id: ${{ matrix.os }}
arguments: releaseWindows
- name: Build Native Binary for Linux
if: matrix.os == 'ubuntu-latest'
uses: burrunan/gradle-cache-action@v2
with:
gradle-version: wrapper
job-id: ${{ matrix.os }}
arguments: releaseLinux
- name: CLI Integrity check using SVG
uses: ./.github/actions/cli-integrity-check
with:
type: svg
continue-on-error: false
- name: CLI Integrity check using XML
uses: ./.github/actions/cli-integrity-check
with:
type: xml
continue-on-error: false
- name: Uploading macos Arm64 binaries
uses: actions/upload-artifact@v4
if: matrix.os == 'macos-latest'
with:
name: ${{ env.file-name }}-macosArm64-binaries # add tag to file name.
path: svg-to-compose/build/bin/macosArm64/releaseExecutable/
if-no-files-found: error
- name: Uploading macos x64 binaries
uses: actions/upload-artifact@v4
if: matrix.os == 'macos-latest'
with:
name: ${{ env.file-name }}-macosX64-binaries # add tag to file name.
path: svg-to-compose/build/bin/macosX64/releaseExecutable/
if-no-files-found: error
- name: Uploading Linux binaries
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: ${{ env.file-name }}-linuxX64-binaries # add tag to file name.
path: svg-to-compose/build/bin/linuxX64/releaseExecutable/
if-no-files-found: error
- name: Uploading Windows binaries
uses: actions/upload-artifact@v4
if: matrix.os == 'windows-latest'
with:
name: ${{ env.file-name }}-mingwX64-binaries # add tag to file name.
path: svg-to-compose/build/bin/mingwX64/releaseExecutable/
if-no-files-found: error
- name: Uploading script
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest' # should only run once.
with:
name: s2c
path: |
s2c
app.properties
if-no-files-found: error
upload-to-release:
permissions:
contents: write
deployments: write
runs-on: ubuntu-latest
needs: create-release-binaries
steps:
- name: Download release artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: ${{ env.file-name }}-*-binaries
merge-multiple: false
- name: Download script artifact
uses: actions/download-artifact@v4
with:
path: artifacts
name: s2c
- name: Get Release version
id: getversion
shell: bash
run: echo "version=$(cat artifacts/app.properties | grep '^VERSION=' | cut -d= -f2)" >> $GITHUB_OUTPUT
- name: Compress binaries
run: |
cd artifacts
zip -r s2c-linuxX64-binaries.zip s2c-linuxX64-binaries
zip -r s2c-macosArm64-binaries.zip s2c-macosArm64-binaries
zip -r s2c-macosX64-binaries.zip s2c-macosX64-binaries
zip -r s2c-mingwX64-binaries.zip s2c-mingwX64-binaries
- name: Display structure of downloaded files
run: ls -R
- name: Create Github release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
draft: true
files: |
artifacts/s2c-linuxX64-binaries.zip
artifacts/s2c-macosArm64-binaries.zip
artifacts/s2c-macosX64-binaries.zip
artifacts/s2c-mingwX64-binaries.zip
artifacts/s2c