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
153 changes: 141 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Release

on:
push:
branches: [main]
paths: ['deno.json']
workflow_dispatch:
inputs:
dry_run:
Expand All @@ -12,6 +15,10 @@ on:
- 'true'
- 'false'

permissions:
contents: write
packages: write

jobs:
detect-version:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,32 +53,154 @@ jobs:
echo "βœ… Release v$VERSION does not exist, proceeding"
fi

test-build:
build-binaries:
runs-on: ubuntu-latest
needs: detect-version
if: needs.detect-version.outputs.should_release == 'true'
strategy:
matrix:
target:
- platform: linux
arch: x86_64
deno_target: x86_64-unknown-linux-gnu
- platform: darwin
arch: x86_64
deno_target: x86_64-apple-darwin
- platform: darwin
arch: arm64
deno_target: aarch64-apple-darwin
- platform: windows
arch: x86_64
deno_target: x86_64-pc-windows-msvc
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.1.4
deno-version: v2.4.3

- name: Test single platform build
- name: Build binary
run: |
VERSION=${{ needs.detect-version.outputs.version }}
echo "πŸ§ͺ Testing build for version $VERSION"
deno compile --allow-all --include data/ --output "test-vibe-v$VERSION" src/cli.ts
ls -la test-vibe-v$VERSION
echo "βœ… Build test successful"
FILENAME="vibe-v$VERSION-${{ matrix.target.platform }}-${{ matrix.target.arch }}"
if [ "${{ matrix.target.platform }}" = "windows" ]; then
FILENAME="$FILENAME.exe"
fi

echo "πŸš€ Building $FILENAME for ${{ matrix.target.deno_target }}"
deno compile --allow-all --include data/ --no-check --target ${{ matrix.target.deno_target }} --output "$FILENAME" src/cli.ts

# Verify binary was created
ls -la "$FILENAME"

- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.target.platform }}-${{ matrix.target.arch }}
path: vibe-v${{ needs.detect-version.outputs.version }}-${{ matrix.target.platform }}-${{ matrix.target.arch }}*
retention-days: 1

placeholder-release:
build-installers:
runs-on: ubuntu-latest
needs: [detect-version, test-build]
needs: [detect-version, build-binaries]
if: needs.detect-version.outputs.should_release == 'true'
permissions:
contents: write
packages: write
steps:
- name: Release placeholder
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Install Task
run: |
echo "πŸš€ Would create release v${{ needs.detect-version.outputs.version }}"
echo "This is a minimal workflow for testing - full workflow on feature branch"
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin

- name: Download all binary artifacts
uses: actions/download-artifact@v4
with:
pattern: binary-*
path: installer/binaries
merge-multiple: true

- name: List downloaded binaries
run: |
echo "πŸ“¦ Downloaded binaries:"
ls -la installer/binaries/

- name: Build installers for all platforms
working-directory: installer
run: |
echo "πŸ—οΈ Building Go installers for all platforms"
~/.local/bin/task build:all

- name: List built installers
run: |
echo "🎁 Built installers:"
ls -la installer/install-dotvibe-*

- name: Upload installer artifacts
uses: actions/upload-artifact@v4
with:
name: installers
path: installer/install-dotvibe-*
retention-days: 1

create-release:
runs-on: ubuntu-latest
needs: [detect-version, build-binaries, build-installers]
if: needs.detect-version.outputs.should_release == 'true'
permissions:
contents: write
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download binary artifacts
uses: actions/download-artifact@v4
with:
pattern: binary-*
path: release-assets
merge-multiple: true

- name: Download installer artifacts
uses: actions/download-artifact@v4
with:
name: installers
path: release-assets

- name: Generate checksums
run: |
cd release-assets
echo "πŸ” Generating checksums for all assets"
sha256sum * > checksums.txt
echo "πŸ“‹ Checksums:"
cat checksums.txt

- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=${{ needs.detect-version.outputs.version }}
TAG="v$VERSION"

echo "πŸš€ Creating release $TAG"

# Create release with auto-generated notes
gh release create "$TAG" \
--title "dotvibe $TAG" \
--generate-notes \
--latest

# Upload all assets
echo "πŸ“¦ Uploading release assets"
gh release upload "$TAG" release-assets/*

echo "βœ… Release $TAG created successfully!"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ yarn-error.log*
mastra/
code2prompt/
js-genai/

embed
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dotvibe/query",
"version": "0.4.0",
"version": "0.4.3",
"description": "LLM-Native Context Query System with 100x Compression",
"homepage": "https://dotvibe.dev",
"repository": "https://github.com/vhybzOS/dotvibe",
Expand Down
27 changes: 27 additions & 0 deletions installer/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ tasks:
desc: Cross-compile for all platforms
cmds:
- GOOS=linux GOARCH=amd64 go build -ldflags "{{.LDFLAGS}}" -o {{.APP_NAME}}-linux-amd64 .
- GOOS=linux GOARCH=arm64 go build -ldflags "{{.LDFLAGS}}" -o {{.APP_NAME}}-linux-arm64 .
- GOOS=darwin GOARCH=amd64 go build -ldflags "{{.LDFLAGS}}" -o {{.APP_NAME}}-darwin-amd64 .
- GOOS=darwin GOARCH=arm64 go build -ldflags "{{.LDFLAGS}}" -o {{.APP_NAME}}-darwin-arm64 .
- GOOS=windows GOARCH=amd64 go build -ldflags "{{.LDFLAGS}}" -o {{.APP_NAME}}-windows-amd64.exe .

test:
Expand Down Expand Up @@ -59,3 +61,28 @@ tasks:
deps: [build]
cmds:
- ./{{.APP_NAME}}{{exeExt}}

run:user:
desc: Build and run installer with user installation (explicit)
deps: [build]
cmds:
- ./{{.APP_NAME}}{{exeExt}} --user

run:global:
desc: Build and run installer with system-wide installation (requires elevation)
deps: [build]
cmds:
- ./{{.APP_NAME}}{{exeExt}} --global

validate:
desc: Validate installer code quality
deps: [lint, test]
cmds:
- echo "βœ… All validations passed"

release:
desc: Build release binaries for all platforms
deps: [validate, build:all]
cmds:
- echo "βœ… Release binaries built for all platforms"
- ls -la {{.APP_NAME}}-*
Loading