-
Notifications
You must be signed in to change notification settings - Fork 3
141 lines (114 loc) · 4.09 KB
/
Copy pathpackage-app.yml
File metadata and controls
141 lines (114 loc) · 4.09 KB
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
name: Generate App Images (Windows, Linux, macOS)
on:
pull_request:
types: [closed]
branches: [ "master" ]
push:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '24'
- name: Install dependencies (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libfreetype6-dev libx11-dev libxext-dev libxrender-dev
- name: Install WiX Toolset (Windows only)
if: runner.os == 'Windows'
run: choco install wixtoolset
- name: Make scripts executable (Linux/macOS)
if: runner.os != 'Windows'
run: chmod +x scripts/*.sh
- name: Run Linux packaging script
if: runner.os == 'Linux'
run: bash scripts/build-tappas-linux.sh
- name: Run Windows packaging script
if: runner.os == 'Windows'
run: scripts\\build-tappas-win.bat
- name: Run macOS packaging script
if: runner.os == 'macOS'
run: bash scripts/build-tappas-macos.sh
- name: Zip app folder (Linux)
if: runner.os == 'Linux'
run: |
mkdir -p release
zip -r release/tappAS-linux.zip dist/
- name: Upload Linux artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: tappAS-linux-zip
path: release/tappAS-linux.zip
- name: Zip app folder (Windows)
if: runner.os == 'Windows'
run: |
New-Item -ItemType Directory -Force -Path release
Compress-Archive -Path dist\* -DestinationPath release\tappAS-windows.zip
- name: Upload Windows artifact
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: tappAS-windows-zip
path: release/tappAS-windows.zip
- name: Zip app folder (macOS)
if: runner.os == 'macOS'
run: |
mkdir -p release
zip -r release/tappAS-macos.zip dist/
- name: Upload macOS artifact
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
with:
name: tappAS-macos-zip
path: release/tappAS-macos.zip
release:
# if: github.event.pull_request.merged == true
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout master after merge
uses: actions/checkout@v4
with:
ref: master
- name: Download ZIPs
uses: actions/download-artifact@v4
with:
path: release-zips
- name: Check ZIP integrity
run: |
ls -lh release-zips || { echo "release-zips folder not found"; exit 1; }
test -f release-zips/tappAS-linux-zip/tappAS-linux.zip || { echo "tappAS-linux.zip not found"; exit 1; }
test -f release-zips/tappAS-windows-zip/tappAS-windows.zip || { echo "tappAS-windows.zip not found"; exit 1; }
test -f release-zips/tappAS-macos-zip/tappAS-macos.zip || { echo " tappAS-macos.zip not found"; exit 1; }
echo " All ZIP files are generated correctly."
- name: Read version
id: version
run: echo "VERSION=$(cat version.txt)" >> $GITHUB_OUTPUT
- name: Read release body from file
id: body
run: |
echo "BODY<<EOF" >> $GITHUB_OUTPUT
cat RELEASE_BODY.md >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.VERSION }}
name: tappAS ${{ steps.version.outputs.VERSION }}
body: ${{ steps.body.outputs.BODY }}
files: |
release-zips/**/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}