perf: add gpt-4o-mini to supported models API #28
This file contains 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: Build and Release | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
check-latest: true | |
- name: Build binary | |
run: | | |
mkdir -p artifact | |
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o duck2api -a -ldflags '-s -w -extldflags "-static"' . && rm -f artifact/duck2api && cp duck2api artifact/duck2api && cd artifact && tar -czvf ../duck2api-linux-amd64.tar.gz * && cd .. | |
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o duck2api -a -ldflags '-s -w -extldflags "-static"' . && rm -f artifact/duck2api && cp duck2api artifact/duck2api && cd artifact && tar -czvf ../duck2api-windows-amd64.tar.gz * && cd .. | |
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o duck2api -a -ldflags '-s -w -extldflags "-static"' . && rm -f artifact/duck2api && cp duck2api artifact/duck2api && cd artifact && tar -czvf ../duck2api-darwin-amd64.tar.gz * && cd .. | |
GOOS=freebsd GOARCH=amd64 CGO_ENABLED=0 go build -o duck2api -a -ldflags '-s -w -extldflags "-static"' . && rm -f artifact/duck2api && cp duck2api artifact/duck2api && cd artifact && tar -czvf ../duck2api-freebsd-amd64.tar.gz * && cd .. | |
- name: Upload artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: duck2api-pre-built.zip | |
path: | | |
duck2api-linux-amd64.tar.gz | |
duck2api-windows-amd64.tar.gz | |
duck2api-darwin-amd64.tar.gz | |
duck2api-freebsd-amd64.tar.gz | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GHCR_PAT }} | |
with: | |
tag_name: v2.1.0 | |
files: | | |
duck2api-linux-amd64.tar.gz | |
duck2api-windows-amd64.tar.gz | |
duck2api-darwin-amd64.tar.gz | |
duck2api-freebsd-amd64.tar.gz | |
- name: Delete workflow runs | |
uses: Mattraks/delete-workflow-runs@v2 | |
with: | |
token: ${{ github.token }} | |
repository: ${{ github.repository }} | |
retain_days: 1 | |
keep_minimum_runs: 8 |