diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml new file mode 100644 index 0000000..c255149 --- /dev/null +++ b/.forgejo/workflows/release.yml @@ -0,0 +1,96 @@ +name: Build and Release Ody Agent + +on: + push: + tags: + - 'v*' + workflow_dispatch: + inputs: + version: + description: 'Version tag (e.g. v1.0.0)' + required: false + default: 'dev' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.22' + + - name: Set version + id: version + run: | + if [ "${{ github.event_name }}" = "push" ]; then + echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + else + echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT + fi + + - name: Build Windows + working-directory: ody-agent + run: | + GOOS=windows GOARCH=amd64 CGO_ENABLED=0 \ + go build \ + -ldflags "-s -w -H=windowsgui -X main.defaultServer=https://425.today" \ + -o ../dist/ody-agent-win.exe . + + - name: Build macOS (Apple Silicon) + working-directory: ody-agent + run: | + GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 \ + go build \ + -ldflags "-s -w -X main.defaultServer=https://425.today" \ + -o ../dist/ody-agent-mac-arm64 . + + - name: Build macOS (Intel) + working-directory: ody-agent + run: | + GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 \ + go build \ + -ldflags "-s -w -X main.defaultServer=https://425.today" \ + -o ../dist/ody-agent-mac-amd64 . + + - name: Build Linux + working-directory: ody-agent + run: | + GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \ + go build \ + -ldflags "-s -w -X main.defaultServer=https://425.today" \ + -o ../dist/ody-agent-linux . + + - name: List artifacts + run: ls -lh dist/ + + - name: Create release + uses: actions/gitea-release@v1 + with: + token: ${{ secrets.FORGEJO_TOKEN }} + tag_name: ${{ steps.version.outputs.VERSION }} + release_name: "Ody Agent ${{ steps.version.outputs.VERSION }}" + body: | + ## Ody Agent ${{ steps.version.outputs.VERSION }} + + Desktop agent for WellSpr.ing / NNN.today merchants. + + ### Downloads + | Platform | File | + |----------|------| + | Windows (64-bit) | `ody-agent-win.exe` | + | macOS Apple Silicon | `ody-agent-mac-arm64` | + | macOS Intel | `ody-agent-mac-amd64` | + | Linux (64-bit) | `ody-agent-linux` | + + ### Quick setup + 1. Download the binary for your platform + 2. Get your `config.env` from the merchant dashboard → AI Agent tab + 3. Place both files in the same folder and run the agent + files: | + dist/ody-agent-win.exe + dist/ody-agent-mac-arm64 + dist/ody-agent-mac-amd64 + dist/ody-agent-linux