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
56 changes: 56 additions & 0 deletions .github/workflows/cli-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
push:
tags:
- "v1.*"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
name: Release CLI
jobs:
build:
name: Build ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
architecture: [x86_64, aarch64]
include:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the additional configs here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a mechanism for adding extra config for a matching matrix variable, documented here. In this case it's defining a Rust target suffix based on the OS we're building on.

- os: ubuntu-latest
suffix: unknown-linux-gnu
- os: macos-latest
suffix: apple-darwin
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.architecture }}-${{ matrix.suffix }}
- id: build
shell: bash
run: |
export TARGET=${{ matrix.architecture }}-${{ matrix.suffix }}
cargo build --release --target $TARGET
cd target/${TARGET}/release
tar -cjf goose-${TARGET}.tar.bz2 goose goosed
export TARGET_PATH="target/${TARGET}/release/goose-${TARGET}.tar.bz2"
echo "TARGET_PATH=${TARGET_PATH}" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: goose-${{ matrix.architecture }}-${{ matrix.suffix }}
path: ${{ steps.build.outputs.TARGET_PATH }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
name: Release
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- uses: ncipollo/release-action@v1
with:
artifacts: "goose-*.bz2"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ Cargo.lock
# UI
./ui/desktop/node_modules
./ui/desktop/out

# Hermit
/.hermit/
/bin/
Loading