Skip to content

Commit

Permalink
Merge branch 'main' into intel-mac-app
Browse files Browse the repository at this point in the history
* main: (23 commits)
  Improve docs & extensions deploy workflow (#996)
  ci: run git tag commands when just tag-push (#1001)
  docs: cleanup (#1035)
  docs: added tutorial template (#1036)
  docs: updated spelling in documentation (#1028)
  really really open markdown links outside (#1002)
  fix: use SSL_CERT_FILE to point to CA bundle, not for mTLS client cert (#1017)
  feat: Add link to github project on extension cards (#1006)
  chore(release): release version 1.0.4 (#1000)
  fix: fix welcome screen azure config submit (#998)
  ci: checkout code to read Cargo.toml for version (#995)
  docs: broken link fix (#994)
  ci: update release processes using Justfile, make reusable workflows have optional version param (#972)
  docs: github tutorial (#993)
  chore: add tests and update url construction for azure provider (#988)
  chore: update docs for ollama endpoint (#992)
  feat: cfg electron to open links in new window (#934)
  fix: improve url construction in provider (#985)
  fix: explicitly add remember_memory tool in the instructions/system prompt (#965)
  feat: add azure openai provider (#960)
  ...
  • Loading branch information
michaelneale committed Feb 3, 2025
2 parents 783ab36 + 1960bb7 commit 61941a9
Show file tree
Hide file tree
Showing 58 changed files with 1,119 additions and 368 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
workflow_call:
inputs:
version:
required: true
required: false
default: ""
type: string
# Let's allow overriding the OSes and architectures in JSON array form:
# e.g. '["ubuntu-latest","macos-latest"]'
Expand Down Expand Up @@ -42,6 +43,7 @@ jobs:
uses: actions/checkout@v4

- name: Update version in Cargo.toml
if: ${{ inputs.version != '' }}
run: |
sed -i.bak 's/^version = ".*"/version = "'${{ inputs.version }}'"/' Cargo.toml
rm -f Cargo.toml.bak
Expand Down Expand Up @@ -74,4 +76,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: goose-${{ matrix.architecture }}-${{ matrix.target-suffix }}
path: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}
4 changes: 3 additions & 1 deletion .github/workflows/bundle-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
inputs:
version:
description: 'Version to set for the build'
required: true
required: false
default: ""
type: string
signing:
description: 'Whether to perform signing and notarization'
Expand Down Expand Up @@ -75,6 +76,7 @@ jobs:

# Update versions before build
- name: Update versions
if: ${{ inputs.version != '' }}
run: |
# Update version in Cargo.toml
sed -i.bak 's/^version = ".*"/version = "'${{ inputs.version }}'"/' Cargo.toml
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
on:
push:
paths-ignore:
- 'documentation/**'
- "documentation/**"
branches:
- main

Expand All @@ -25,12 +25,15 @@ jobs:
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
# checkout code so we can read the Cargo.toml
- uses: actions/checkout@v4
- name: Generate a canary version
id: set-version
run: |
# TODO: fix this to be dynamic - extract version from repo
# Extract the version from Cargo.toml
SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
VERSION="1.0.3-canary+${SHORT_SHA}"
VERSION=$(grep '^version\s*=' Cargo.toml | head -n 1 | cut -d\" -f2)
VERSION="${VERSION}-canary+${SHORT_SHA}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
# ------------------------------------
Expand All @@ -48,7 +51,7 @@ jobs:
install-script:
name: Upload Install Script
runs-on: ubuntu-latest
needs: [ build-cli ]
needs: [build-cli]
steps:
- uses: actions/checkout@v4
- uses: actions/upload-artifact@v4
Expand All @@ -71,14 +74,14 @@ jobs:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}

# ------------------------------------
# 5) Create/Update GitHub Release
# ------------------------------------
release:
name: Release
runs-on: ubuntu-latest
needs: [ build-cli, install-script, bundle-desktop ]
needs: [build-cli, install-script, bundle-desktop]
permissions:
contents: write

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
on:
push:
paths-ignore:
- 'documentation/**'
- "documentation/**"
branches:
- main
pull_request:
paths-ignore:
- 'documentation/**'
- "documentation/**"
branches:
- main
workflow_dispatch:
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
node-version: "lts/*"

- name: Install Dependencies
run: npm ci
Expand All @@ -104,5 +104,4 @@ jobs:
uses: ./.github/workflows/bundle-desktop.yml
if: github.event_name == 'pull_request'
with:
version: 1.0.3 # TODO: fix this to be dynamic
signing: false
24 changes: 22 additions & 2 deletions .github/workflows/deploy-docs-and-extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
branches:
- main

pull_request:
paths:
- 'documentation/**'
- 'extensions-site/**'

jobs:
deploy:
Expand All @@ -18,6 +23,14 @@ jobs:
with:
node-version: 20

- name: Cache Node.js modules (documentation)
uses: actions/cache@v3
with:
path: ./documentation/node_modules
key: ${{ runner.os }}-documentation-${{ hashFiles('./documentation/package-lock.json') }}
restore-keys: |
${{ runner.os }}-documentation-
- name: Install dependencies and build docs
working-directory: ./documentation
env:
Expand All @@ -28,6 +41,14 @@ jobs:
npm install
npm run build
- name: Cache Node.js modules (extensions-site)
uses: actions/cache@v3
with:
path: ./extensions-site/node_modules
key: ${{ runner.os }}-extensions-${{ hashFiles('./extensions-site/package-lock.json') }}
restore-keys: |
${{ runner.os }}-extensions-
- name: Install dependencies and build extensions-site
working-directory: ./extensions-site
env:
Expand All @@ -44,9 +65,8 @@ jobs:
cp -r extensions-site/build/client/* combined-build/v1/extensions/
- name: Deploy to /gh-pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: combined-build
destination_dir: . # Deploy the site to the root /goose directory

7 changes: 3 additions & 4 deletions .github/workflows/pr-comment-bundle-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
if: ${{ needs.trigger-on-command.outputs.continue == 'true' }}
uses: ./.github/workflows/bundle-desktop.yml
with:
version: 1.0.3 # TODO: fix this to be dynamic
signing: true
secrets:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
Expand Down Expand Up @@ -71,11 +70,11 @@ jobs:
issue-number: ${{ needs.trigger-on-command.outputs.pr_number }}
body: |
### Desktop App for this PR
The following build is available for testing:
- [📱 macOS Desktop App (arm64, signed)](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/Goose-darwin-arm64.zip)
After downloading, unzip the file and drag the Goose.app to your Applications folder. The app is signed and notarized for macOS.
This link is provided by nightly.link and will work even if you're not logged into GitHub.
33 changes: 6 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
on:
push:
paths-ignore:
- 'documentation/**'
- "documentation/**"
tags:
- "v1.*"

Expand All @@ -13,31 +13,13 @@ concurrency:

jobs:
# ------------------------------------
# 1) Set version variables first
# ------------------------------------
prepare-version:
name: Prepare Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
- name: Extract version
id: set-version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
# ------------------------------------
# 3) Build CLI for multiple OS/Arch
# 1) Build CLI for multiple OS/Arch
# ------------------------------------
build-cli:
needs: [prepare-version]
uses: ./.github/workflows/build-cli.yml
with:
version: ${{ needs.prepare-version.outputs.version }}

# ------------------------------------
# 4) Upload Install CLI Script
# 2) Upload Install CLI Script
# ------------------------------------
install-script:
name: Upload Install Script
Expand All @@ -51,13 +33,11 @@ jobs:
path: download_cli.sh

# ------------------------------------------------------------
# 5) Bundle Desktop App (macOS only)
# 3) Bundle Desktop App (macOS only)
# ------------------------------------------------------------
bundle-desktop:
needs: [prepare-version]
uses: ./.github/workflows/bundle-desktop.yml
with:
version: ${{ needs.prepare-version.outputs.version }}
signing: true
secrets:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
Expand All @@ -67,7 +47,7 @@ jobs:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}

# ------------------------------------
# 6) Create/Update GitHub Release
# 4) Create/Update GitHub Release
# ------------------------------------
release:
name: Release
Expand All @@ -80,7 +60,7 @@ jobs:
uses: actions/download-artifact@v4
with:
merge-multiple: true

# Create/update the versioned release
- name: Release versioned
uses: ncipollo/release-action@v1
Expand Down Expand Up @@ -108,4 +88,3 @@ jobs:
allowUpdates: true
omitBody: true
omitPrereleaseDuringUpdate: true

2 changes: 2 additions & 0 deletions .intersect/intersect-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
PR_REVIEW: true
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolver = "2"

[workspace.package]
edition = "2021"
version = "1.0.3"
version = "1.0.4"
authors = ["Block <ai-oss-tools@block.xyz>"]
license = "Apache-2.0"
repository = "https://github.com/block/goose"
Expand Down
76 changes: 72 additions & 4 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Justfile

# list all tasks
default:
@just --list

# Default release command
release:
release-binary:
@echo "Building release version..."
cargo build --release
@just copy-binary
Expand Down Expand Up @@ -34,7 +38,7 @@ copy-binary-intel:

# Run UI with latest
run-ui:
@just release
@just release-binary
@echo "Running UI..."
cd ui/desktop && npm install && npm run start-gui

Expand All @@ -50,7 +54,7 @@ run-server:

# make GUI with latest binary
make-ui:
@just release
@just release-binary
cd ui/desktop && npm run bundle:default

# make GUI with latest binary
Expand All @@ -61,4 +65,68 @@ make-ui-intel:
# Setup langfuse server
langfuse-server:
#!/usr/bin/env bash
./scripts/setup_langfuse.sh
./scripts/setup_langfuse.sh
# ensure the current branch is "main" or error
ensure-main:
#!/usr/bin/env bash
branch=$(git rev-parse --abbrev-ref HEAD); \
if [ "$branch" != "main" ]; then \
echo "Error: You are not on the main branch (current: $branch)"; \
exit 1; \
fi
# check that main is up to date with upstream main
git fetch
# @{u} refers to upstream branch of current branch
if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then \
echo "Error: Your branch is not up to date with the upstream main branch"; \
echo " ensure your branch is up to date (git pull)"; \
exit 1; \
fi

# validate the version is semver, and not the current version
validate version:
#!/usr/bin/env bash
if [[ ! "{{ version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-.*)?$ ]]; then
echo "[error]: invalid version '{{ version }}'."
echo " expected: semver format major.minor.patch or major.minor.patch-<suffix>"
exit 1
fi
current_version=$(just get-tag-version)
if [[ "{{ version }}" == "$current_version" ]]; then
echo "[error]: current_version '$current_version' is the same as target version '{{ version }}'"
echo " expected: new version in semver format"
exit 1
fi

# set cargo and app versions, must be semver
release version: ensure-main
@just validate {{ version }} || exit 1

@git switch -c "release/{{ version }}"
@uvx --from=toml-cli toml set --toml-path=Cargo.toml "workspace.package.version" {{ version }}

@cd ui/desktop && npm version {{ version }} --no-git-tag-version --allow-same-version

@git add Cargo.toml ui/desktop/package.json ui/desktop/package-lock.json
@git commit --message "chore(release): release version {{ version }}"

# extract version from Cargo.toml
get-tag-version:
@uvx --from=toml-cli toml get --toml-path=Cargo.toml "workspace.package.version"

# create the git tag from Cargo.toml, must be on main
tag: ensure-main
git tag v$(just get-tag-version)

# create tag and push to origin (use this when release branch is merged to main)
tag-push: tag
# this will kick of ci for release
git push origin tag v$(just get-tag-version)

# generate release notes from git commits
release-notes:
#!/usr/bin/env bash
git log --pretty=format:"- %s" v$(just get-tag-version)..HEAD
Loading

0 comments on commit 61941a9

Please sign in to comment.