-
Notifications
You must be signed in to change notification settings - Fork 4
136 lines (129 loc) · 4.96 KB
/
build_release.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
name: Build Release
on:
push:
pull_request:
workflow_dispatch:
env:
RELEASE_VERSION: ${{ github.ref_name }}
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
submodules: true
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ">=18.16.0"
check-latest: true
cache: yarn
- name: Install dependencies
run: |
yarn install --frozen-lockfile
- name: Inject release info to the program
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "" > ./App/is_released_version
- name: Build Linux
if: matrix.os == 'ubuntu-latest'
run: |
yarn run build:linux
mv dist/linux-unpacked/resources/app.asar dist/app.asar
rm -rf dist/linux-unpacked
rm -rf dist/linux-arm64-unpacked
node ./deb_build_files/ci_prepare.js
node ./deb_build_files/ci_build.js
- name: Build Windows
if: matrix.os == 'windows-latest'
run: |
yarn run build:win
rm -r dist/win-unpacked
rm -r dist/win-ia32-unpacked
rm -r dist/win-arm64-unpacked
rm dist/bbg-ia32.exe
rm dist/bbg-ia32.exe.blockmap
- name: Build macOS
if: matrix.os == 'macos-latest'
run: |
yarn run build:mac
rm -rf dist/mac
rm -rf dist/mac-arm64
- name: Show build files
run: |
ls dist
- name: Upload Linux artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
name: linux-artifact
path: |
dist/
- name: Upload Windows artifacts
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: windows-artifact
path: |
dist/
- name: Upload macOS artifacts
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v3
with:
name: macos-artifact
path: |
dist/
release:
needs:
- build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: |
dist/
- name: Prepare release
run: |
cd dist
mv -f linux-artifact/* .
mv -f windows-artifact/* .
mv -f macos-artifact/* .
rm -rf builder-debug.yml linux-artifact windows-artifact macos-artifact
mv bbg-amd64.deb bbg-${RELEASE_VERSION}-amd64.deb
mv bbg-arm64.dmg bbg-${RELEASE_VERSION}-arm64.dmg
mv bbg-x64.dmg bbg-${RELEASE_VERSION}-x64.dmg
mv bbg-x64.exe bbg-${RELEASE_VERSION}-setup-x64.exe
mv bbg.exe bbg-${RELEASE_VERSION}-setup-x86.exe
mv bbg-x64.tar.gz bbg-${RELEASE_VERSION}-x64-linux.tar.gz
mv bbg-x86_64.AppImage bbg-${RELEASE_VERSION}-x86_64.AppImage
mv bbg-arm64.dmg.blockmap bbg-${RELEASE_VERSION}-arm64.dmg.blockmap
mv bbg.exe.blockmap bbg-${RELEASE_VERSION}-x86.exe.blockmap
mv bbg-x64.dmg.blockmap bbg-${RELEASE_VERSION}-x64.dmg.blockmap
mv bbg-x64.exe.blockmap bbg-${RELEASE_VERSION}-x64.exe.blockmap
mv bbg-arm64.deb bbg-${RELEASE_VERSION}-arm64.deb
mv bbg-arm64.exe bbg-${RELEASE_VERSION}-arm64.exe
shasum -a 256 * > SHA256SUMS
cd ..
- name: Show file structure
run: |
tree -a
- name: Release
uses: softprops/action-gh-release@v1
with:
name: Version ${{ github.ref_name }} / 版本 ${{ github.ref_name }}
draft: false
prerelease: false
body: |
The program package supports most desktop operating systems e.g., macOS, Windows, and Linux. The current version supports [many languages](https://github.com/bbg-contributors/bbg-lang) as application language, despite the support for languages other than Chinese is currently experimental, so bugs may occur. If you have any suggestions or feedback, please send them to [GitHub Issues](https://github.com/bbg-contributors/bbg/issues/new). We will process them in our spare time.
[Changelog](https://bbg.nekomoe.xyz/#/en/CHANGELOG)
---
本项目支持 macOS、Windows、Linux 等常见桌面平台。目前应用程序支持[多种语言](https://github.com/bbg-contributors/bbg-lang),但对中文以外的语言的支持目前仍是实验性的,因而可能会出现 Bug。如果你有任何意见或建议,请将它们发送到 [GitHub Issues](https://github.com/bbg-contributors/bbg/issues/new) 中。我们会在空余时间处理这些问题。
[更新日志](https://bbg.nekomoe.xyz/#/zh-cn/CHANGELOG)
files: |
dist/*