👷 update github action & readme
This commit is contained in:
parent
b0fefd6dc5
commit
3ac0b256e3
54
.github/workflows/linux-release.yml
vendored
Normal file
54
.github/workflows/linux-release.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
name: Linux Release
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
- "!*-alpha*"
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
- name: Build Frontend
|
||||||
|
env:
|
||||||
|
CI: ""
|
||||||
|
run: |
|
||||||
|
cd web
|
||||||
|
npm install
|
||||||
|
REACT_APP_VERSION=$(git describe --tags) npm run build
|
||||||
|
cd ..
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: ">=1.18.0"
|
||||||
|
- name: Build Backend (amd64)
|
||||||
|
run: |
|
||||||
|
go mod download
|
||||||
|
go build -ldflags "-s -w -X 'one-api/common.Version=$(git describe --tags)' -extldflags '-static'" -o one-api
|
||||||
|
|
||||||
|
- name: Build Backend (arm64)
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install gcc-aarch64-linux-gnu
|
||||||
|
CC=aarch64-linux-gnu-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w -X 'one-api/common.Version=$(git describe --tags)' -extldflags '-static'" -o one-api-arm64
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
one-api
|
||||||
|
one-api-arm64
|
||||||
|
draft: true
|
||||||
|
generate_release_notes: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GT_Token }}
|
45
.github/workflows/macos-release.yml
vendored
Normal file
45
.github/workflows/macos-release.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: macOS Release
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
- "!*-alpha*"
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
- name: Build Frontend
|
||||||
|
env:
|
||||||
|
CI: ""
|
||||||
|
run: |
|
||||||
|
cd web
|
||||||
|
npm install
|
||||||
|
REACT_APP_VERSION=$(git describe --tags) npm run build
|
||||||
|
cd ..
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: ">=1.18.0"
|
||||||
|
- name: Build Backend
|
||||||
|
run: |
|
||||||
|
go mod download
|
||||||
|
go build -ldflags "-X 'one-api/common.Version=$(git describe --tags)'" -o one-api-macos
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: one-api-macos
|
||||||
|
draft: true
|
||||||
|
generate_release_notes: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GT_Token }}
|
48
.github/workflows/windows-release.yml
vendored
Normal file
48
.github/workflows/windows-release.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
name: Windows Release
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
- "!*-alpha*"
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: windows-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
- name: Build Frontend
|
||||||
|
env:
|
||||||
|
CI: ""
|
||||||
|
run: |
|
||||||
|
cd web
|
||||||
|
npm install
|
||||||
|
REACT_APP_VERSION=$(git describe --tags) npm run build
|
||||||
|
cd ..
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: ">=1.18.0"
|
||||||
|
- name: Build Backend
|
||||||
|
run: |
|
||||||
|
go mod download
|
||||||
|
go build -ldflags "-s -w -X 'one-api/common.Version=$(git describe --tags)'" -o one-api.exe
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: one-api.exe
|
||||||
|
draft: true
|
||||||
|
generate_release_notes: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GT_Token }}
|
@ -16,11 +16,19 @@ _This project is a derivative of [one-api](https://github.com/songquanpeng/one-a
|
|||||||
<a href="https://raw.githubusercontent.com/MartialBE/one-api/main/LICENSE">
|
<a href="https://raw.githubusercontent.com/MartialBE/one-api/main/LICENSE">
|
||||||
<img src="https://img.shields.io/github/license/MartialBE/one-api?color=brightgreen" alt="license">
|
<img src="https://img.shields.io/github/license/MartialBE/one-api?color=brightgreen" alt="license">
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/MartialBE/one-api/releases/latest">
|
||||||
|
<img src="https://img.shields.io/github/v/release/MartialBE/one-api?color=brightgreen&include_prereleases" alt="release">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/users/MartialBE/packages/container/package/one-api">
|
||||||
|
<img src="https://img.shields.io/badge/docker-ghcr.io-blue" alt="docker">
|
||||||
|
</a>
|
||||||
<a href="https://goreportcard.com/report/github.com/MartialBE/one-api">
|
<a href="https://goreportcard.com/report/github.com/MartialBE/one-api">
|
||||||
<img src="https://goreportcard.com/badge/github.com/MartialBE/one-api" alt="GoReportCard">
|
<img src="https://goreportcard.com/badge/github.com/MartialBE/one-api" alt="GoReportCard">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
**Please do not mix with the original version, as the different channel ID may cause data disorder.**
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||
|
@ -16,11 +16,19 @@ _このプロジェクトは、[one-api](https://github.com/songquanpeng/one-api
|
|||||||
<a href="https://raw.githubusercontent.com/MartialBE/one-api/main/LICENSE">
|
<a href="https://raw.githubusercontent.com/MartialBE/one-api/main/LICENSE">
|
||||||
<img src="https://img.shields.io/github/license/MartialBE/one-api?color=brightgreen" alt="license">
|
<img src="https://img.shields.io/github/license/MartialBE/one-api?color=brightgreen" alt="license">
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/MartialBE/one-api/releases/latest">
|
||||||
|
<img src="https://img.shields.io/github/v/release/MartialBE/one-api?color=brightgreen&include_prereleases" alt="release">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/users/MartialBE/packages/container/package/one-api">
|
||||||
|
<img src="https://img.shields.io/badge/docker-ghcr.io-blue" alt="docker">
|
||||||
|
</a>
|
||||||
<a href="https://goreportcard.com/report/github.com/MartialBE/one-api">
|
<a href="https://goreportcard.com/report/github.com/MartialBE/one-api">
|
||||||
<img src="https://goreportcard.com/badge/github.com/MartialBE/one-api" alt="GoReportCard">
|
<img src="https://goreportcard.com/badge/github.com/MartialBE/one-api" alt="GoReportCard">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
**オリジナルバージョンと混合しないでください。チャンネル ID が異なるため、データの混乱を引き起こす可能性があります**
|
||||||
|
|
||||||
## スクリーンショット
|
## スクリーンショット
|
||||||
|
|
||||||

|

|
||||||
|
@ -16,11 +16,19 @@ _本项目是基于[one-api](https://github.com/songquanpeng/one-api)二次开
|
|||||||
<a href="https://raw.githubusercontent.com/MartialBE/one-api/main/LICENSE">
|
<a href="https://raw.githubusercontent.com/MartialBE/one-api/main/LICENSE">
|
||||||
<img src="https://img.shields.io/github/license/MartialBE/one-api?color=brightgreen" alt="license">
|
<img src="https://img.shields.io/github/license/MartialBE/one-api?color=brightgreen" alt="license">
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://github.com/MartialBE/one-api/releases/latest">
|
||||||
|
<img src="https://img.shields.io/github/v/release/MartialBE/one-api?color=brightgreen&include_prereleases" alt="release">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/users/MartialBE/packages/container/package/one-api">
|
||||||
|
<img src="https://img.shields.io/badge/docker-ghcr.io-blue" alt="docker">
|
||||||
|
</a>
|
||||||
<a href="https://goreportcard.com/report/github.com/MartialBE/one-api">
|
<a href="https://goreportcard.com/report/github.com/MartialBE/one-api">
|
||||||
<img src="https://goreportcard.com/badge/github.com/MartialBE/one-api" alt="GoReportCard">
|
<img src="https://goreportcard.com/badge/github.com/MartialBE/one-api" alt="GoReportCard">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
**请不要和原版混用,因为 channel id 不同的原因,会导致数据错乱**
|
||||||
|
|
||||||
# 截图展示
|
# 截图展示
|
||||||
|
|
||||||

|

|
||||||
|
Loading…
Reference in New Issue
Block a user