forked from signalapp/Signal-Desktop
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'clearnet'
- Loading branch information
Showing
33 changed files
with
993 additions
and
382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# This script will build session production binaries anytime a branch is updated | ||
name: Session Build Binaries | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- development | ||
- clearnet | ||
- github-actions | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-2016, macos-latest, ubuntu-latest] | ||
env: | ||
SIGNAL_ENV: production | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout git repo | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10.13.0 | ||
|
||
- name: Setup node for windows | ||
if: runner.os == 'Windows' | ||
run: | | ||
npm install --global --production windows-build-tools@4.0.0 | ||
npm install --global node-gyp@latest | ||
npm config set python python2.7 | ||
npm config set msvs_version 2015 | ||
- name: Install yarn | ||
run: npm install yarn --no-save | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Generate and concat files | ||
run: yarn generate | ||
|
||
- name: Lint Files | ||
run: yarn lint-full | ||
|
||
- 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: $(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion=${{ github.ref }} --publish=never --config.directories.output=release | ||
env: | ||
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }} | ||
CSC_KEY_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: $(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --publish=never --config.directories.output=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 }}-production | ||
path: release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# This script will build binaries and publish a draft on github release page with the the tag v[package-version] | ||
name: Session Draft Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-2016, macos-latest, ubuntu-latest] | ||
env: | ||
SIGNAL_ENV: production | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout git repo | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10.13.0 | ||
|
||
- name: Setup node for windows | ||
if: runner.os == 'Windows' | ||
run: | | ||
npm install --global --production windows-build-tools@4.0.0 | ||
npm install --global node-gyp@latest | ||
npm config set python python2.7 | ||
npm config set msvs_version 2015 | ||
- name: Install yarn | ||
run: npm install yarn --no-save | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Generate and concat files | ||
run: yarn generate | ||
|
||
- name: Lint Files | ||
run: yarn lint-full | ||
|
||
- name: Build windows production binaries | ||
if: runner.os == 'Windows' | ||
run: node_modules\.bin\electron-builder --config.extraMetadata.environment=%SIGNAL_ENV% --publish=always | ||
|
||
- name: Build mac production binaries | ||
if: runner.os == 'macOS' | ||
run: $(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion=${{ github.ref }} --publish=always | ||
env: | ||
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }} | ||
CSC_KEY_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: $(yarn bin)/electron-builder --config.extraMetadata.environment=$SIGNAL_ENV --publish=always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Building | ||
|
||
Building session binaries is done using github actions. Windows and linux binaries will build right out of the box but there are some extra steps needed for Mac OS | ||
|
||
## Mac OS | ||
|
||
The build script for Mac OS requires you to have a valid `Developer ID Application` certificate. Without this the build script cannot sign and notarize the mac binary which is needed for Catalina 10.15 and above. | ||
If you would like to disable this then comment out `"afterSign": "build/notarize.js",` in package.json. | ||
|
||
You will also need an [App-specific password](https://support.apple.com/en-al/HT204397) for the apple account you wish to notarize with | ||
|
||
### Setup | ||
|
||
Once you have your `Developer ID Application` you need to export it into a `.p12` file. Keep a note of the password used to encrypt this file as it will be needed later. | ||
|
||
We need to Base64 encode this file, so run the following command: | ||
|
||
``` | ||
base64 -i certificate.p12 -o encoded.txt | ||
``` | ||
|
||
#### On GitHub: | ||
|
||
1. Navigate to the main page of the repository. | ||
2. Under your repository name, click **Settings**. | ||
3. In the left sidebar, click **Secrets**. | ||
4. Add the following secrets: | ||
1. Certificate | ||
* Name: `MAC_CERTIFICATE` | ||
* Value: The encoded Base64 certificate | ||
2. Certificate password | ||
* Name: `MAC_CERTIFICATE_PASSWORD` | ||
* Value: The password that was set when the certificate was exported. | ||
3. Apple ID | ||
* Name: `SIGNING_APPLE_ID` | ||
* Value: The apple id (email) to use for signing | ||
4. Apple Password | ||
* Name: `SIGNING_APP_PASSWORD` | ||
* Value: The app-specific password that was generated for the apple id | ||
5. Team ID (Optional) | ||
* Name: `SIGNING_TEAM_ID` | ||
* Value: The apple team id if you're sigining the application for a team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.