forked from signalapp/Signal-Desktop
-
Notifications
You must be signed in to change notification settings - Fork 193
82 lines (71 loc) · 2.58 KB
/
build-binaries.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
# This script will build session production binaries anytime a branch is updated
name: Session Build Binaries
on:
push:
branches:
- clearnet
- unstable
- release/
- ci/
pull_request:
branches:
- clearnet
- unstable
- release/
- ci/
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# We want a mac arm64 build, and according to this https://github.com/actions/runner-images#available-images macos-14 is always arm64
os: [windows-2022, ubuntu-20.04, macos-12, macos-14]
env:
SIGNAL_ENV: production
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: git config --global core.autocrlf false
- name: Checkout git repo
uses: actions/checkout@v3
- name: Setup & Build
uses: ./actions/setup_and_build
- name: Enforce yarn.lock has no duplicates
uses: ./actions/deduplicate_fail
- name: Build windows production binaries
if: runner.os == 'Windows'
run: node_modules\.bin\electron-builder --config.extraMetadata.environment=%SIGNAL_ENV% --publish=never --config.directories.output=release
- name: Build mac production binaries
if: runner.os == 'macOS'
run: |
source ./build/setup-mac-certificate.sh
$(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion=${{ github.ref }} --publish=never --config.directories.output=release
env:
MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }}
MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }}
SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }}
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
- name: Build linux production binaries
if: runner.os == 'Linux'
run: |
sudo apt-get install -y rpm
yarn build-release
- name: Remove unpacked files
run: |
ls -d -- */ | xargs -I{} echo "Removing {}"
ls -d -- */ | xargs -I{} rm -rf {}
shell: bash
working-directory: ./release/
- name: Remaining files
run: ls .
shell: bash
working-directory: ./release/
- name: Upload Production Artifacts
uses: actions/upload-artifact@v1
with:
name: ${{ runner.os }}-${{ runner.arch }}-production
path: release