Skip to content
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
220 changes: 220 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
name: Release
Comment thread
coderabbitai[bot] marked this conversation as resolved.

on:
push:
branches:
- main
- master
workflow_dispatch:

permissions:
contents: read

jobs:
check-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
tag: ${{ steps.get_version.outputs.tag }}
should_release: ${{ steps.check.outputs.should_release }}

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Get current version
id: get_version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=v$VERSION" >> $GITHUB_OUTPUT

- name: Check if GitHub release already exists for this version
id: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="v$(node -p "require('./package.json').version")"
echo "Checking for existing release with tag: $TAG"
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${{ github.repository }}/releases/tags/$TAG")
echo "GitHub API response status: $HTTP_STATUS"
case "$HTTP_STATUS" in
404)
echo "No existing release found — will create one."
echo "should_release=true" >> $GITHUB_OUTPUT
;;
200)
echo "Release $TAG already exists — skipping."
echo "should_release=false" >> $GITHUB_OUTPUT
;;
*)
echo "GitHub release lookup failed with HTTP $HTTP_STATUS." >&2
exit 1
;;
esac

# Build: Windows
build-windows:
needs: check-version
if: needs.check-version.outputs.should_release == 'true'
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 24
cache: npm

- name: Clean cache
run: |
if (Test-Path node_modules) { Remove-Item -Recurse -Force node_modules }
npm cache clean --force
shell: pwsh

- name: Install dependencies
run: npm ci --include=optional

- name: Rebuild native dependencies
run: npx electron-builder install-app-deps

- name: Build frontend
run: npm run build

- name: Package Electron app
run: npm run dist -- --publish=never

- name: Upload Windows artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: release-windows
path: dist/*.exe
retention-days: 1

# Build: Linux
build-linux:
needs: check-version
if: needs.check-version.outputs.should_release == 'true'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 24
cache: npm

- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libgtk-3-dev libnotify-dev libnss3 libxss1 libasound2-dev libx11-dev libxrandr-dev || true

- name: Install dependencies
run: npm ci --include=optional

- name: Rebuild native dependencies
run: npx electron-builder install-app-deps

- name: Build frontend
run: npm run build

- name: Package Electron app
run: npm run dist -- --publish=never

- name: Upload Linux artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: release-linux
path: dist/*.AppImage
retention-days: 1

#Build: macOS
build-macos:
needs: check-version
if: needs.check-version.outputs.should_release == 'true'
runs-on: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci --include=optional

- name: Rebuild native dependencies
run: npx electron-builder install-app-deps

- name: Build frontend
run: npm run build

- name: Package Electron app (unsigned)
env:
# Skip Apple code signing
CSC_IDENTITY_AUTO_DISCOVERY: false
run: npm run dist -- --publish=never
Comment thread
PinJinx marked this conversation as resolved.
- name: Upload macOS artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: release-macos
path: dist/*.dmg
retention-days: 1

# Create GitHub Release
release:
needs: [check-version, build-windows, build-linux, build-macos]
if: needs.check-version.outputs.should_release == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: release-${{ needs.check-version.outputs.tag }}
cancel-in-progress: false

steps:
- name: Download Windows artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: release-windows
path: artifacts/windows

- name: Download Linux artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: release-linux
path: artifacts/linux

- name: Download macOS artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: release-macos
path: artifacts/macos

- name: Create GitHub Release
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
with:
tag_name: ${{ needs.check-version.outputs.tag }}
name: Rein ${{ needs.check-version.outputs.tag }}
draft: false
prerelease: true
generate_release_notes: true
files: |
artifacts/windows/*.exe
artifacts/linux/*.AppImage
artifacts/macos/*.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.5/schema.json",
"$schema": "https://biomejs.dev/schemas/2.5.8/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
Expand Down
Binary file added brand/Media-Assets/Icons/Icon128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading