Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Aug 29, 2024
1 parent 7438dbd commit 3e2797d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 43 deletions.
34 changes: 6 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,42 +80,20 @@ jobs:
- name: Install dependencies
run: npm install

- name: Import PFX certificate
- name: Package Electron App
run: |
certutil -f -p ${{ secrets.CERT_PASSWORD }} -importpfx my "$(pwd)\\tools\\certs\\dev-cert.pfx"
shell: pwsh

- name: Build Electron app
run: |
npm run make -- --arch=${{ matrix.arch }}
env:
ELECTRON_CACHE: ${{ runner.temp }}/electron
npm_config_arch: ${{ matrix.arch }}
npm_config_platform: win32
CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }}
WINDOWS_KIT_PATH: ${{ env.WINDOWS_KIT_PATH }}

- name: Verify signing tools
run: |
signtool verify /v /pa "$(pwd)\\out\\make\\appx\\${{ matrix.arch }}\\*.appx"
shell: pwsh

- name: Debug - Show certificate details
run: |
certutil -store my
shell: pwsh
npx electron-packager . Comet --platform=win32 --arch=${{ matrix.arch }} --out=out --overwrite
- name: Extract version from package.json on Windows
- name: Convert Electron App to AppX
run: |
$VERSION = (Get-Content package.json | ConvertFrom-Json).version
Write-Host "VERSION=$VERSION" >> $env:GITHUB_ENV
electron-windows-store --input-directory out\Comet-win32-${{ matrix.arch }} --output-directory out\appx --package-version 1.0.0.0 --package-name Comet --package-display-name "Comet Video Converter" --package-description "A simple video converter" --package-executable Comet.exe --publisher "CN=${{ secrets.PUBLISHER }}" --dev-cert $(pwd)\\tools\\certs\\dev-cert.pfx --cert-pass ${{ secrets.CERT_PASSWORD }} --windows-kit ${{ env.WINDOWS_KIT_PATH }}
shell: pwsh

- name: Upload files to Cloudflare R2
run: |
Get-ChildItem -Path out\make\ -File | ForEach-Object {
Get-ChildItem -Path out\appx -File | ForEach-Object {
Write-Host "Uploading $($_.Name)"
aws s3 cp $_.FullName "s3://${{ secrets.R2_BUCKET }}/releases/v${{ env.VERSION }}/$($_.Name)" `
aws s3 cp $_.FullName "s3://${{ secrets.R2_BUCKET }}/releases/v1.0.0.0/$($_.Name)" `
--endpoint-url="${{ secrets.R2_ENDPOINT }}" --debug
}
shell: pwsh
Expand Down
15 changes: 0 additions & 15 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,6 @@ const config: ForgeConfig = {
version: version,
}),
},
{
name: '@electron-forge/maker-appx',
platforms: ['win32'],
config: {
packageName: 'JeromeThayananthajothy.Comet',
packageDisplayName: 'Comet',
packageDescription: 'A simple video converter',
packageVersion: `${version}.1`,
publisher: 'CN=E0D72A6F-3D67-49D6-9EA4-99FAFB4620E5',
devCert: path.resolve('tools/certs/dev-cert.pfx'),
certPass: process.env.CERT_PASSWORD,
windowsKit: process.env.WINDOWS_KIT_PATH,
icon: path.resolve(iconDir, 'icon.ico'),
},
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
Expand Down

0 comments on commit 3e2797d

Please sign in to comment.