mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-19 19:41:06 +00:00
- Trigger via Actions UI with a version input (e.g. "0.1.0") - Only runs on main branch - Creates git tag cli/v<version> automatically - Then GoReleaser builds all 6 binaries and creates the GitHub Release
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Release CLI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "Release version (e.g. 0.1.0)"
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
if: github.ref == 'refs/heads/main'
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: packages/browseros-agent/apps/cli
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: packages/browseros-agent/apps/cli/go.mod
|
|
|
|
- name: Run tests
|
|
run: go test ./... -v
|
|
|
|
- name: Run vet
|
|
run: go vet ./...
|
|
|
|
- name: Create tag
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git tag -a "cli/v${{ inputs.version }}" -m "browseros-cli v${{ inputs.version }}"
|
|
git push origin "cli/v${{ inputs.version }}"
|
|
|
|
- uses: goreleaser/goreleaser-action@v6
|
|
with:
|
|
version: "~> v2"
|
|
args: release --clean
|
|
workdir: packages/browseros-agent/apps/cli
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|