1
0
This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
chatgpt-to-api/.github/workflows/build.yml

52 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2023-05-25 17:59:01 +00:00
name: Go Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- goos: windows
goarch: 386
- goos: windows
goarch: amd64
- goos: windows
goarch: arm64
- goos: linux
goarch: 386
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build
run: |
echo "Building for ${{ matrix.goos }} ${{ matrix.goarch }}"
suffix=""
if [ "${{ matrix.goos }}" == "windows" ]; then
suffix=".exe"
fi
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ./build/freechatgpt-${{ matrix.goos }}-${{ matrix.goarch }}$suffix
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: freechatgpt-${{ matrix.goos }}-${{ matrix.goarch }}
path: ./build/freechatgpt-${{ matrix.goos }}-${{ matrix.goarch }}*