Skip to content

fix: Update desktop-app-release.yaml #71

fix: Update desktop-app-release.yaml

fix: Update desktop-app-release.yaml #71

name: Desktop App Release
on:
push:
branches:
- v1.0
pull_request:
branches:
- v1.0
jobs:
build-and-bundle:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/index
key: ${{ runner.os }}-cargo-index
restore-keys: |
${{ runner.os }}-cargo-index
- name: Cache Cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
# Install UV and download tokenizer files
- name: Install UV
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Run download_tokenizer_files.py
run: uv run download_tokenizer_files.py
# Build Rust Binary
- name: Build Release Binary
run: cargo build --release
- name: copy binary
run: cp target/release/goosed ui/desktop/src/bin/goosed
# Desktop App Steps
- name: Add MacOS certs for signing and notarization
run: ./add-macos-cert.sh
working-directory: ui/desktop
env:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
working-directory: ui/desktop
- name: Make default Goose App
run: npm run bundle:default
working-directory: ui/desktop
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Upload default
uses: actions/upload-artifact@v4
with:
name: Goose_test.zip
path: ui/desktop/out/Goose-darwin-arm64/Goose.zip
- name: Comment on Pull Request with Artifact Link
if: ${{ github.event_name == 'pull_request' }}
uses: actions/github-script@v6
with:
script: |
const artifactUrl = `https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}`
const commentBody = `A new artifact has been created for this PR. You can download it [here](${artifactUrl}).`
github.rest.issues.createComment({
issue_number: ${{ github.event.pull_request.number }},
owner: context.repo.owner,
repo: context.repo.repo,
body: commentBody
})