mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-17 23:52:36 +00:00
ci(desktop): add desktop release workflow and cask stub
This commit is contained in:
parent
89f038fc67
commit
9fa67e84f6
2 changed files with 95 additions and 0 deletions
82
.github/workflows/desktop-release.yml
vendored
Normal file
82
.github/workflows/desktop-release.yml
vendored
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
name: Desktop Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'desktop-v*'
|
||||
|
||||
# Concurrency convention: see CONTRIBUTING.md -> "GitHub Actions -- Concurrency Convention".
|
||||
# Tag refs are unique per release, so distinct tags run in parallel. Re-pushes of the
|
||||
# same tag serialize. cancel-in-progress: false -- never cancel a publish mid-flight.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build ${{ matrix.label }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-latest
|
||||
label: Windows NSIS
|
||||
command: npm run build:win
|
||||
asset_pattern: gitnexus-desktop/release/*/GitNexus Desktop Setup *.exe
|
||||
- os: macos-latest
|
||||
label: macOS DMG
|
||||
command: npm run build:mac
|
||||
asset_pattern: gitnexus-desktop/release/*/*.dmg
|
||||
- os: ubuntu-latest
|
||||
label: Linux AppImage
|
||||
command: npm run build:linux
|
||||
asset_pattern: gitnexus-desktop/release/*/*.AppImage
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: gitnexus-desktop/package-lock.json
|
||||
|
||||
- name: Install desktop dependencies
|
||||
run: npm ci
|
||||
working-directory: gitnexus-desktop
|
||||
|
||||
- name: Build desktop package
|
||||
run: ${{ matrix.command }}
|
||||
working-directory: gitnexus-desktop
|
||||
|
||||
- name: Ensure GitHub Release exists
|
||||
shell: bash
|
||||
run: |
|
||||
if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
gh release create "$GITHUB_REF_NAME" \
|
||||
--title "GitNexus Desktop $GITHUB_REF_NAME" \
|
||||
--notes "" || gh release view "$GITHUB_REF_NAME" >/dev/null
|
||||
|
||||
- name: Upload desktop asset to GitHub Release
|
||||
shell: bash
|
||||
run: |
|
||||
pattern='${{ matrix.asset_pattern }}'
|
||||
mapfile -t files < <(compgen -G "$pattern")
|
||||
|
||||
if [ "${#files[@]}" -eq 0 ]; then
|
||||
echo "::error::No files matched pattern: $pattern"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gh release upload "$GITHUB_REF_NAME" "${files[@]}" --clobber
|
||||
13
gitnexus-desktop/Formula/gitnexus-desktop.rb
Normal file
13
gitnexus-desktop/Formula/gitnexus-desktop.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# NOTE: sha256 will be updated once the first desktop-v* release is published.
|
||||
# Submit to homebrew/homebrew-cask after first release tag is cut.
|
||||
cask "gitnexus-desktop" do
|
||||
version "0.1.0"
|
||||
sha256 :no_check
|
||||
|
||||
url "https://github.com/abhigyanpatwari/GitNexus/releases/download/desktop-v#{version}/GitNexus-Desktop-#{version}.dmg"
|
||||
name "GitNexus Desktop"
|
||||
desc "Cross-platform desktop app for GitNexus code intelligence"
|
||||
homepage "https://github.com/abhigyanpatwari/GitNexus"
|
||||
|
||||
app "GitNexus Desktop.app"
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue