feat: 官方AI总结, improve: 卡片链接通过合并转发发送, 别的懒得找了 #45
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 | |
on: [push, pull_request] | |
env: | |
COMMIT_ID: "${{ github.sha }}" | |
BINARY_PREFIX: "NothingBot_" | |
BINARY_SUFFIX: "" | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goos: [linux, windows] | |
goarch: [amd64] | |
#exclude: | |
fail-fast: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
cache: true | |
- name: Build | |
env: | |
GOOS: ${{ matrix.goos }} | |
GOARCH: ${{ matrix.goarch }} | |
run: | | |
export BINARY_SUFFIX="_${COMMIT_ID::7}" | |
if [ $GOOS = "windows" ]; then export BINARY_SUFFIX="$BINARY_SUFFIX.exe"; fi | |
export BINARY_NAME="$BINARY_PREFIX"$GOOS"_$GOARCH$BINARY_SUFFIX" | |
export LD_FLAGS="-s -w" | |
go build -o "output/$BINARY_NAME" -trimpath -ldflags "$LD_FLAGS" ./... | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.goos }}_${{ matrix.goarch }} | |
path: output/ |