fix(ci): use explicit github.com/ action URLs; replace gitea-release with direct API upload

This commit is contained in:
gitadmin 2026-04-24 02:39:48 +00:00
parent 557eadaa0a
commit 9716b833a0

View file

@ -15,10 +15,10 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: https://github.com/actions/checkout@v4
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: https://github.com/actions/setup-go@v5
with: with:
go-version: '1.22' go-version: '1.22'
@ -31,66 +31,48 @@ jobs:
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
fi fi
- name: Build Windows - name: Build all platforms
working-directory: ody-agent
run: | run: |
mkdir -p dist
cd ody-agent
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 \ GOOS=windows GOARCH=amd64 CGO_ENABLED=0 \
go build \ go build -ldflags "-s -w -H=windowsgui -X main.defaultServer=https://425.today" \
-ldflags "-s -w -H=windowsgui -X main.defaultServer=https://425.today" \
-o ../dist/ody-agent-win.exe . -o ../dist/ody-agent-win.exe .
- name: Build macOS (Apple Silicon)
working-directory: ody-agent
run: |
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 \ GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 \
go build \ go build -ldflags "-s -w -X main.defaultServer=https://425.today" \
-ldflags "-s -w -X main.defaultServer=https://425.today" \
-o ../dist/ody-agent-mac-arm64 . -o ../dist/ody-agent-mac-arm64 .
- name: Build macOS (Intel)
working-directory: ody-agent
run: |
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 \ GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 \
go build \ go build -ldflags "-s -w -X main.defaultServer=https://425.today" \
-ldflags "-s -w -X main.defaultServer=https://425.today" \
-o ../dist/ody-agent-mac-amd64 . -o ../dist/ody-agent-mac-amd64 .
- name: Build Linux
working-directory: ody-agent
run: |
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build \ go build -ldflags "-s -w -X main.defaultServer=https://425.today" \
-ldflags "-s -w -X main.defaultServer=https://425.today" \
-o ../dist/ody-agent-linux . -o ../dist/ody-agent-linux .
ls -lh ../dist/
- name: List artifacts - name: Create release and upload assets
run: ls -lh dist/ run: |
VERSION="${{ steps.version.outputs.VERSION }}"
echo "Publishing release $VERSION"
- name: Create release # Create the release (may already exist from manual tag push)
uses: actions/gitea-release@v1 RELEASE=$(curl -sf -X POST "https://git.wellspr.ing/api/v1/repos/wellspring/ody-agent/releases" \
with: -H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
token: ${{ secrets.FORGEJO_TOKEN }} -H "Content-Type: application/json" \
tag_name: ${{ steps.version.outputs.VERSION }} -d "{\"tag_name\":\"$VERSION\",\"name\":\"Ody Agent $VERSION\",\"body\":\"### Ody Agent $VERSION\n\nDesktop agent for WellSpr.ing / NNN.today merchants.\n\n| Platform | File |\n|---|---|\n| Windows | \`ody-agent-win.exe\` |\n| macOS Apple Silicon | \`ody-agent-mac-arm64\` |\n| macOS Intel | \`ody-agent-mac-amd64\` |\n| Linux | \`ody-agent-linux\` |\",\"draft\":false,\"prerelease\":false}" \
release_name: "Ody Agent ${{ steps.version.outputs.VERSION }}" || curl -sf "https://git.wellspr.ing/api/v1/repos/wellspring/ody-agent/releases/tags/$VERSION" \
body: | -H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}")
## Ody Agent ${{ steps.version.outputs.VERSION }}
Desktop agent for WellSpr.ing / NNN.today merchants. RELEASE_ID=$(echo "$RELEASE" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
echo "Release ID: $RELEASE_ID"
### Downloads for f in dist/*; do
| Platform | File | FNAME=$(basename "$f")
|----------|------| echo "Uploading $FNAME..."
| Windows (64-bit) | `ody-agent-win.exe` | curl -sf -X POST \
| macOS Apple Silicon | `ody-agent-mac-arm64` | "https://git.wellspr.ing/api/v1/repos/wellspring/ody-agent/releases/$RELEASE_ID/assets?name=$FNAME" \
| macOS Intel | `ody-agent-mac-amd64` | -H "Authorization: token ${{ secrets.FORGEJO_TOKEN }}" \
| Linux (64-bit) | `ody-agent-linux` | -H "Content-Type: application/octet-stream" \
--data-binary "@$f"
### Quick setup echo " uploaded."
1. Download the binary for your platform done
2. Get your `config.env` from the merchant dashboard → AI Agent tab echo "Release complete: https://git.wellspr.ing/wellspring/ody-agent/releases/tag/$VERSION"
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