Skip to content

Commit

Permalink
Merge pull request #280 from vitalygashkov/next
Browse files Browse the repository at this point in the history
Extended LocalStorage with async/sync load/save methods, improved desktop app deploy workflow
  • Loading branch information
vitalygashkov authored Dec 28, 2024
2 parents d337519 + 8d2dff3 commit 74c80f5
Show file tree
Hide file tree
Showing 7 changed files with 344 additions and 64 deletions.
83 changes: 37 additions & 46 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,63 @@
name: Release Desktop

on: workflow_dispatch

env:
APP_NAME: streamyx
on:
workflow_dispatch:

defaults:
run:
working-directory: apps/desktop

jobs:
release:
runs-on: ${{ matrix.os }}

build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest, ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.CONTROL_REPO_TOKEN }}
submodules: recursive

- name: Install Apple codesigning certificate
if: matrix.os == 'macos-latest'
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_SIGNING_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.APPLE_SIGNING_CERTIFICATE_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
run: |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: git config --global url."https://${{ secrets.CONTROL_REPO_TOKEN }}@github.com/".insteadOf ssh://[email protected]/

- run: npm install
working-directory: ./

- name: build-linux
if: matrix.os == 'ubuntu-latest'
run: npm run build:linux

- name: build-mac
if: matrix.os == 'macos-latest'
run: npm run build:mac
- run: npm ci

- name: build-win
if: matrix.os == 'windows-latest'
run: npm run build:win
- name: Publish app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_IDENTITY: ${{ secrets.APPLE_IDENTITY }}
run: npm run publish

- name: Get package name and version
- name: Clean up keychain
if: ${{ always() }}
run: |
test -n $(node -p -e "require('./package.json').version") &&
echo APP_VERSION=$(node -p -e "require('./package.json').version") >> $GITHUB_ENV || exit 1
- name: release
uses: softprops/action-gh-release@v2
with:
name: CLI v${{ env.APP_VERSION }}
tag_name: cli-v${{ env.APP_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true
draft: true
files: |
dist/*.exe
dist/*.zip
dist/*.dmg
dist/*.AppImage
dist/*.snap
dist/*.deb
dist/*.rpm
dist/*.tar.gz
dist/*.yml
dist/*.blockmap
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
2 changes: 1 addition & 1 deletion apps/cli
Submodule cli updated from c0c214 to 1ea31a
2 changes: 1 addition & 1 deletion apps/desktop
Loading

0 comments on commit 74c80f5

Please sign in to comment.