Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Sep 5, 2024
2 parents 3b811ba + f86ec8d commit 248f69c
Show file tree
Hide file tree
Showing 9 changed files with 256 additions and 18,068 deletions.
187 changes: 153 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,77 +6,196 @@ on:
- release

jobs:
build:
build-macos:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x64, arm64]
runs-on: ${{ matrix.os }}
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Cache Node.js modules
id: cache-node-modules
uses: actions/cache@v3
- name: Install dependencies
run: npm install

- name: Build Electron app
run: |
npm run publish -- --arch=${{ matrix.arch }}
env:
ELECTRON_CACHE: ${{ runner.temp }}/electron
npm_config_arch: ${{ matrix.arch }}
npm_config_platform: darwin
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Extract version from package.json
run: |
VERSION=$(node -e "console.log(require('./package.json').version);")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
name: build-artifacts-macos-${{ matrix.arch }}
path: out/make/

build-linux:
strategy:
matrix:
arch: [x64, arm64]
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Build Electron app
run: |
npm run make -- --arch=${{ matrix.arch }}
npm run publish -- --arch=${{ matrix.arch }}
env:
ELECTRON_CACHE: ${{ runner.temp }}/electron
npm_config_arch: ${{ matrix.arch }}
npm_config_platform: ${{ matrix.os }}
npm_config_platform: linux
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Upload artifacts
- name: Extract version from package.json
run: |
VERSION=$(node -e "console.log(require('./package.json').version);")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-distributables
path: out/make # Adjust the path to where your distributables are stored
name: build-artifacts-linux-${{ matrix.arch }}
path: out/make/

build-windows:
strategy:
matrix:
arch: [x64, arm64]
runs-on: windows-latest

publish:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install Microsoft Build Tools
run: |
choco install microsoft-build-tools -y
shell: pwsh

- name: Verify makeappx.exe and build & sign the appx
run: |
# Verify makeappx.exe
$makeappxPath = 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\makeappx.exe'
if (Test-Path $makeappxPath) {
echo "makeappx.exe found at $makeappxPath"
$env:WINDOWS_KIT_PATH="C:\Program Files (x86)\Windows Kits\10\App Certification Kit"
} else {
Write-Error "makeappx.exe not found."
exit 1
}
# Install dependencies
npm install
# Build and sign the appx using Electron Forge
npm run publish -- --arch=${{ matrix.arch }}
env:
WINDOWS_KIT_PATH: ${{ env.WINDOWS_KIT_PATH }}
CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
shell: pwsh

- name: Extract version from package.json
id: version
run: |
VERSION=$(node -p "require('./package.json').version")
$version = (node -e "console.log(require('./package.json').version);")
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts-windows-${{ matrix.arch }}
path: out/make/

upload-artifacts:
needs: [build-macos, build-linux, build-windows]
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Extract version from package.json
run: |
VERSION=$(node -e "console.log(require('./package.json').version);")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Download artifacts
- name: Download build artifacts (macos x64)
uses: actions/download-artifact@v3
with:
path: all-distributables
name: build-artifacts-macos-x64
path: artifacts

- name: Create and Upload to Release
uses: ncipollo/release-action@v1
- name: Download build artifacts (macos arm64)
uses: actions/download-artifact@v3
with:
name: build-artifacts-macos-arm64
path: artifacts

- name: Download build artifacts (linux x64)
uses: actions/download-artifact@v3
with:
tag: v${{ env.VERSION }}
name: v${{ env.VERSION }}
draft: true
prerelease: true
artifacts: "all-distributables/**/*"
token: ${{ secrets.GH_TOKEN }}
name: build-artifacts-linux-x64
path: artifacts

- name: Download build artifacts (linux arm64)
uses: actions/download-artifact@v3
with:
name: build-artifacts-linux-arm64
path: artifacts

- name: Download build artifacts (windows x64)
uses: actions/download-artifact@v3
with:
name: build-artifacts-windows-x64
path: artifacts

- name: Download build artifacts (windows arm64)
uses: actions/download-artifact@v3
with:
name: build-artifacts-windows-arm64
path: artifacts

- name: Upload files to Cloudflare R2
run: |
for file in $(find artifacts/ -type f -iname '*comet*'); do
echo "Uploading $(basename "$file")"
aws s3 cp "$file" "s3://${{ secrets.R2_BUCKET }}/releases/v${{ env.VERSION }}/$(basename "$file")" \
--endpoint-url="${{ secrets.R2_ENDPOINT }}" --debug
done
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.R2_REGION }}
shell: bash
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,5 @@ typings/
# Electron-Forge
out/
note.md
cert.pem
key.pem
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Release Notes

## [Unreleased](https://github.com/stellar-comet/comet/compare/v0.0.3...HEAD)
## [Unreleased](https://github.com/stellar-comet/comet/compare/v1.0.0...HEAD)

## [v1.0.0](https://github.com/stellar-comet/comet/compare/v0.0.3...v1.0.0) - 2024-09-02

Initial stable release.

## [v0.0.3](https://github.com/stellar-comet/comet/compare/v0.0.2...v0.0.3) - 2024-08-24

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

<p align="center"><a href="https://comet.thavarshan.com" target="_blank"><img src="./src/assets/images/demo.gif" width="600" alt="Comet Demo"></a></p>

[![Release](https://github.com/stellar-comet/comet/actions/workflows/release.yml/badge.svg?branch=release)](https://github.com/stellar-comet/comet/actions/workflows/release.yml)

## Project Overview

Comet's goal is to provide a free, user-friendly, and visually appealing application for converting video files. Whether you need to convert a single video or multiple files at once, Comet is here to help.
Expand Down
Loading

0 comments on commit 248f69c

Please sign in to comment.