Skip to content

File Browser functionalities complete #123

File Browser functionalities complete

File Browser functionalities complete #123

Workflow file for this run

name: MacOS Build and Release Electron App
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: macos-latest
env:
CI: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23' # Change to your required Go version
- name: Install ZeroMQ
run: |
brew update
brew install zeromq
- name: Build
run: go build -o ui/public/zasper
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.7'
- name: Install dependencies
run: cd ui && npm install
- name: Package Electron app
run: cd ui && npm run electron-package
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: zasper-0.1.0-arm64.dmg
path: ui/dist/zasper-0.1.0-arm64.dmg
- name: Create Release Asset
if: github.event_name == 'release'
run: |
release_url=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-X POST \
-d "{\"tag_name\":\"${{ github.event.release.tag_name }}\"}" \
https://api.github.com/repos/${{ github.repository }}/releases)
upload_url=$(echo "$release_url" | jq -r .upload_url | sed 's/{?name,label}//')
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/zip" \
--data-binary "@path/to/your/output/files/your-app.zip" \
"$upload_url?name=your-app.zip"