-
Notifications
You must be signed in to change notification settings - Fork 6
154 lines (139 loc) · 5.85 KB
/
Copy pathrelease.yml
File metadata and controls
154 lines (139 loc) · 5.85 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
142
143
144
145
146
147
148
149
150
151
152
153
154
name: Create GitHub release
on:
workflow_dispatch:
inputs:
release:
type: choice
description: 'Should this build be released?'
options:
- true
- false
default: 'false'
ref_to_build:
description: 'Ref to build (only tested by providing tags), e.g. v6.1.0'
required: true
env:
SIGNAL_TAG: ${{ inputs.ref_to_build }}
jobs:
linux:
runs-on: ubuntu-22.04-arm
steps:
# Checkout repos
- name: Get GH token
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GH_APP_DENNIS_APP_ID }}
private_key: ${{ secrets.GH_APP_DENNIS_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
repository: 'signalapp/signal-desktop'
ref: ${{ inputs.ref_to_build }}
token: ${{ steps.generate_token.outputs.token }}
fetch-depth: 200
- name: Create ${{ inputs.ref_to_build }} tag in dennisameling/Signal-Desktop
run: |
git remote add dennis https://github.com/dennisameling/Signal-Desktop
git push --force dennis HEAD:refs/tags/$SIGNAL_TAG
- uses: actions/checkout@v4
with:
path: ./tmp-automation-release-scripts
# Install NodeJS and prepare dependencies
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- name: Setup node.js
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'
- run: sudo apt-get update && sudo apt-get install xvfb libpulse0
- run: npm install -g npm@10.2.5
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install FPM (for packaging)
run: gem install fpm
- name: Prepare release signing
run: |
echo ${{ secrets.SIGN_RELEASE_PUBLIC_KEY }} >> public.key
echo ${{ secrets.SIGN_RELEASE_PRIVATE_KEY }} >> private.key
# Copy files to the patches/ directory where all of Signal's per-dependency patches live
# NOTE: after creating a patch, make sure to add it to patch-files.mjs too!
- run: cp -v ./tmp-automation-release-scripts/patches/* patches/
# The script below ensures that we overwrite some defaults from the official Signal repo
- name: Overwrite updates server, public key, etc.
run: PUBLIC_KEY="${{ secrets.SIGN_RELEASE_PUBLIC_KEY }}" SIGNAL_DIR="${{ github.workspace }}" node ./tmp-automation-release-scripts/patch-files.mjs
# Build Sticker Creator
- working-directory: ./sticker-creator
run: |
pnpm install
pnpm run build
# The steps below pretty much exactly mimic the official build
# https://github.com/signalapp/Signal-Desktop/blob/main/.github/workflows/ci.yml
# Note that we use --no-frozen-lockfile here because we added an entry to
# the pnpm.patchedDependencies section in package.json (see patch-files.mjs)
- run: pnpm install --no-frozen-lockfile
- run: pnpm run generate
- run: pnpm run prepare-beta-build
- name: Create bundle
run: pnpm run build:esbuild:prod
# Doesn't seem to work and no logs, so skipping it
#- name: Create preload cache
# run: xvfb-run --auto-servernum pnpm run build:preload-cache
# env:
# ARTIFACTS_DIR: artifacts/linux
- name: Build with packaging .deb file
run: pnpm run build:release --publish=never
env:
USE_SYSTEM_FPM: 'true'
DISABLE_INSPECT_FUSE: 'on'
- run: xvfb-run --auto-servernum pnpm run test-node
- run: xvfb-run --auto-servernum pnpm run test-electron
- uses: actions/upload-artifact@v4
with:
name: release-binaries
path: release/signal-desktop-unofficial*
release:
needs: linux
runs-on: ubuntu-latest
if: inputs.release == 'true'
outputs:
release_url: ${{ steps.release-url.outputs.html_url }}
signal_version: ${{ steps.signal-version.outputs.version }}
steps:
- name: Get GH token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.GH_APP_DENNIS_APP_ID }}
private_key: ${{ secrets.GH_APP_DENNIS_PRIVATE_KEY }}
# Turns v6.1.0 into 6.1.0
- name: Get version from tag
id: signal-version
run: |
SIGNAL_VERSION=${SIGNAL_TAG#"v"}
echo "SIGNAL_VERSION=${SIGNAL_VERSION}" >> $GITHUB_ENV
echo "SIGNAL_TAG=${SIGNAL_TAG}" >> $GITHUB_ENV
echo "version=${SIGNAL_VERSION}" >> $GITHUB_OUTPUT
- uses: actions/download-artifact@v4
with:
name: release-binaries
path: binaries
- uses: ncipollo/release-action@v1
id: release-url
with:
owner: dennisameling
repo: Signal-Desktop
makeLatest: true
artifacts: 'binaries/*'
tag: ${{ inputs.ref_to_build }}
body: |
This is the v${{ env.SIGNAL_VERSION }} release.
## Linux arm64
This release contains a `.deb` file for Linux users. Note that auto-updates are **not** supported on this platform.
## Windows arm64
> [!WARNING]
> Official support for Windows arm64 [was added in Signal 7.34.0](https://github.com/signalapp/Signal-Desktop/issues/3745#issuecomment-2489355026), meaning that I will no longer be offering builds for Signal Unofficial. The last release with Windows arm64 support here is 7.35.0. **You can migrate to the official client while keeping all your chat history and data**. Instructions are [here](https://github.com/dennisameling/Signal-Desktop/issues/24#issuecomment-2490816224).
name: v${{ env.SIGNAL_VERSION }}
token: ${{ steps.generate_token.outputs.token }}