Some checks are pending
Security Checks / security (push) Waiting to run
统一 frontend、backend、test、test-log 和 out 目录,更新构建、部署及测试入口;纳入配置管理兼容与首次安全引导修复;排除本机配置、密钥和测试产物。
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: Release Binary
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
goos: ['linux', 'darwin', 'windows']
|
|
goarch: ['amd64', 'arm64']
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: plugins/pmail_telegram_push
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.26.6'
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24'
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: '10'
|
|
run_install: false
|
|
standalone: true
|
|
- name: Download dependencies
|
|
run: |
|
|
pnpm install --frozen-lockfile
|
|
go mod tidy
|
|
go mod download
|
|
- name: Build binary
|
|
run: |
|
|
pnpm build
|
|
mkdir -p ../../out/plugins
|
|
if [[ "${{ matrix.goos }}" = "windows" ]]; then
|
|
go build -o ../../out/plugins/pmail_telegram_push_${{ matrix.goos }}_${{ matrix.goarch }}.exe -ldflags="-s -w"
|
|
else
|
|
go build -o ../../out/plugins/pmail_telegram_push_${{ matrix.goos }}_${{ matrix.goarch }} -ldflags="-s -w"
|
|
fi
|
|
env:
|
|
GOOS: ${{ matrix.goos }}
|
|
GOARCH: ${{ matrix.goarch }}
|
|
CGO_ENABLED: 0
|
|
- name: Publish Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
allowUpdates: true
|
|
artifactErrorsFailBuild: true
|
|
artifacts: 'out/plugins/pmail_telegram_push_${{ matrix.goos }}_${{ matrix.goarch }}*'
|
|
commit: ${{ github.sha }}
|
|
draft: false
|
|
prerelease: false
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|