fix mammouth upgrade
#19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to release (e.g., 1.0.0)" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Determine version | |
| id: version | |
| run: | | |
| if [ -n "${{ inputs.version }}" ]; then | |
| VERSION="${{ inputs.version }}" | |
| else | |
| VERSION="${GITHUB_REF#refs/tags/v}" | |
| fi | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Building version: $VERSION" | |
| - name: Build CLI | |
| run: | | |
| cd packages/opencode | |
| bun run ./script/build.ts | |
| env: | |
| OPENCODE_VERSION: ${{ steps.version.outputs.version }} | |
| OPENCODE_CHANNEL: latest | |
| - name: Package binaries | |
| run: | | |
| cd packages/opencode/dist | |
| # Create archives for each platform | |
| for dir in mammouth-*/; do | |
| name="${dir%/}" | |
| if [[ "$name" == *"windows"* ]]; then | |
| zip -r "${name}.zip" "$dir" | |
| else | |
| tar -czvf "${name}.tar.gz" "$dir" | |
| fi | |
| done | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ steps.version.outputs.version }} | |
| name: Mammouth Code v${{ steps.version.outputs.version }} | |
| draft: false | |
| prerelease: false | |
| files: | | |
| packages/opencode/dist/mammouth-*.tar.gz | |
| packages/opencode/dist/mammouth-*.zip | |
| body: | | |
| ## Mammouth Code v${{ steps.version.outputs.version }} | |
| ### Installation | |
| **macOS / Linux (curl)** | |
| ```bash | |
| curl -fsSL https://code.mammouth.ai/install.sh | bash | |
| ``` | |
| **Windows (PowerShell)** | |
| ```powershell | |
| irm https://code.mammouth.ai/install.ps1 | iex | |
| ``` | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |