Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CD #29

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 10 additions & 32 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:

runs-on: ${{ matrix.os }}
timeout-minutes: 30
env:
APPLE_API_KEY: ${{ github.workspace }}/AuthKey.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
REACT_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE }}
DEBUG: electron*

steps:
- name: Checkout to git repository
Expand All @@ -36,17 +42,10 @@ jobs:

- name: Configure keychain
if: runner.os == 'macOS'
env:
IDENTITY_PASSPHRASE: ${{ secrets.IDENTITY_PASSPHRASE }}
IDENTITY_P12_B64: ${{ secrets.IDENTITY_P12_B64 }}
run: |
echo $IDENTITY_P12_B64 | base64 -d > DS_ID_App.p12
security create-keychain -p $IDENTITY_PASSPHRASE build.keychain
security unlock-keychain -p $IDENTITY_PASSPHRASE build.keychain
security list-keychains -d user -s build.keychain
security default-keychain -s build.keychain
security import DS_ID_App.p12 -k build.keychain -P $IDENTITY_PASSPHRASE -A -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k $IDENTITY_PASSPHRASE build.keychain
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.IDENTITY_P12_B64 }}
p12-password: ${{ secrets.IDENTITY_PASSPHRASE }}

- name: Run install
uses: borales/actions-yarn@v4
Expand All @@ -60,41 +59,20 @@ jobs:

- name: Run build intel distributive
uses: borales/actions-yarn@v4
env:
APPLE_API_KEY: ${{ github.workspace }}/AuthKey.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
REACT_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
DEBUG: electron*
with:
cmd: publish:intel
dir: 'apps/desktop'

- name: Run build arm distributive
if: runner.os != 'Windows'
uses: borales/actions-yarn@v4
env:
APPLE_API_KEY: ${{ github.workspace }}/AuthKey.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
REACT_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
DEBUG: electron*
with:
cmd: publish:arm
dir: 'apps/desktop'

- name: Run build universal distributive
if: runner.os == 'macOS'
uses: borales/actions-yarn@v4
env:
APPLE_API_KEY: ${{ github.workspace }}/AuthKey.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
REACT_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
DEBUG: electron*
with:
cmd: publish:universal
dir: 'apps/desktop'
Expand Down
49 changes: 10 additions & 39 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:

runs-on: ${{ matrix.os }}
timeout-minutes: 30
env:
APPLE_API_KEY: ${{ github.workspace }}/AuthKey.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
REACT_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE }}
DEBUG: electron*

steps:
- name: Checkout to git repository
Expand All @@ -36,17 +42,10 @@ jobs:

- name: Configure keychain
if: runner.os == 'macOS'
env:
IDENTITY_PASSPHRASE: ${{ secrets.IDENTITY_PASSPHRASE }}
IDENTITY_P12_B64: ${{ secrets.IDENTITY_P12_B64 }}
run: |
echo $IDENTITY_P12_B64 | base64 -d > DS_ID_App.p12
security create-keychain -p $IDENTITY_PASSPHRASE build.keychain
security unlock-keychain -p $IDENTITY_PASSPHRASE build.keychain
security list-keychains -d user -s build.keychain
security default-keychain -s build.keychain
security import DS_ID_App.p12 -k build.keychain -P $IDENTITY_PASSPHRASE -A -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k $IDENTITY_PASSPHRASE build.keychain
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.IDENTITY_P12_B64 }}
p12-password: ${{ secrets.IDENTITY_PASSPHRASE }}

- name: Run install
uses: borales/actions-yarn@v4
Expand All @@ -60,37 +59,19 @@ jobs:

- name: Run build intel distributive
uses: borales/actions-yarn@v4
env:
APPLE_API_KEY: ${{ github.workspace }}/AuthKey.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
REACT_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE }}
DEBUG: electron*
with:
cmd: make:intel
dir: 'apps/desktop'

- name: Run build arm distributive
uses: borales/actions-yarn@v4
env:
APPLE_API_KEY: ${{ github.workspace }}/AuthKey.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
REACT_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE }}
DEBUG: electron*
with:
cmd: make:arm
dir: 'apps/desktop'

- name: Run build universal distributive
if: runner.os == 'macOS'
uses: borales/actions-yarn@v4
env:
APPLE_API_KEY: ${{ github.workspace }}/AuthKey.p8
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
REACT_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE }}
DEBUG: electron*
with:
cmd: make:universal
dir: 'apps/desktop'
Expand All @@ -104,15 +85,6 @@ jobs:
path: |
${{ github.workspace }}/apps/desktop/out/make

- name: Upload distributives to artifacts
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: Tonkeeper Desktop ${{ runner.os }} arm64
retention-days: 10
path: |
${{ github.workspace }}/apps/desktop/out/make/squirrel.windows/arm64

- name: Upload distributives to artifacts
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
Expand Down Expand Up @@ -143,7 +115,6 @@ jobs:
- name: Clean-up credentials
if: always() && runner.os == 'macOS'
run: |
security delete-keychain build.keychain
rm ${{ github.workspace }}/AuthKey.p8

web-build:
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/electron/mainWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export abstract class MainWindow {
// Create the browser window.
this.mainWindow = new BrowserWindow({
icon: icon,
width: process.platform == 'linux' ? 438 : 446,
width: 438,
height: 700,
resizable: isDev,
autoHideMenuBar: process.platform != 'darwin',
Expand Down