Skip to content

Commit ab8bbc9

Browse files
committed
0.1.4
1 parent cf3e388 commit ab8bbc9

2 files changed

Lines changed: 2157 additions & 0 deletions

File tree

.github/workflows/go-build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,50 @@ jobs:
146146
with:
147147
name: hunyuan2api-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.set-version.outputs.version }}
148148
path: hunyuan2api-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.os == 'windows' && '.exe' || '' }}
149+
retention-days: 90
150+
151+
build-qwen2api:
152+
name: Build qwen2api
153+
runs-on: ubuntu-latest
154+
strategy:
155+
matrix:
156+
os: [windows, linux]
157+
arch: [amd64]
158+
steps:
159+
- name: Check out code
160+
uses: actions/checkout@v4
161+
162+
- name: Set up Go
163+
uses: actions/setup-go@v4
164+
with:
165+
go-version: '1.21'
166+
check-latest: true
167+
cache: true
168+
169+
- name: Set version
170+
id: set-version
171+
run: |
172+
echo "version=$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
173+
174+
- name: Build for ${{ matrix.os }}-${{ matrix.arch }}
175+
env:
176+
GOOS: ${{ matrix.os }}
177+
GOARCH: ${{ matrix.arch }}
178+
VERSION: ${{ steps.set-version.outputs.version }}
179+
run: |
180+
# 设置文件扩展名(Windows为.exe,其他无扩展名)
181+
if [ "${{ matrix.os }}" == "windows" ]; then
182+
EXT=".exe"
183+
else
184+
EXT=""
185+
fi
186+
187+
BINARY_NAME="qwen2api-${{ matrix.os }}-${{ matrix.arch }}${EXT}"
188+
go build -ldflags "-X main.AppVersion=$VERSION" -o "$BINARY_NAME" ./qwen2api.go
189+
190+
- name: Upload Artifact
191+
uses: actions/upload-artifact@v4
192+
with:
193+
name: qwen2api-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.set-version.outputs.version }}
194+
path: qwen2api-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.os == 'windows' && '.exe' || '' }}
149195
retention-days: 90

0 commit comments

Comments
 (0)