ci: add Forgejo Actions release workflow
Some checks failed
Build and Release Ody Agent / build (push) Failing after 35s
Some checks failed
Build and Release Ody Agent / build (push) Failing after 35s
Builds Windows/macOS-arm64/macOS-amd64/Linux on every v* tag push. Requires FORGEJO_TOKEN secret in repo settings.
This commit is contained in:
parent
6aac38fb3b
commit
557eadaa0a
1 changed files with 96 additions and 0 deletions
96
.forgejo/workflows/release.yml
Normal file
96
.forgejo/workflows/release.yml
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Reference in a new issue