ci: build CLI on master pushes
This commit is contained in:
@@ -1,26 +1,19 @@
|
||||
name: CLI Release
|
||||
name: CLI Build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
release:
|
||||
build:
|
||||
runs-on: tencent-local
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build CLI binaries
|
||||
run: VERSION=${{ github.ref_name }} ./scripts/build-cli.sh
|
||||
run: ./scripts/build-cli.sh
|
||||
|
||||
- name: Publish Gitea release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1.3.7
|
||||
with:
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
files: |
|
||||
dist/ufile-cli_*
|
||||
dist/checksums.txt
|
||||
- name: Verify checksums
|
||||
run: cd dist && sha256sum -c checksums.txt
|
||||
|
||||
@@ -39,7 +39,7 @@ printf '%s\n' "$UFILE_PASSWORD" | \
|
||||
make cli-dist
|
||||
```
|
||||
|
||||
产物位于 `dist/`,覆盖 Linux、macOS 和 Windows 的 amd64/arm64,并附带 `checksums.txt`。推送 `v*` 标签会通过 Gitea Actions 创建 Release;需要预先配置具有仓库发布权限的 `RELEASE_TOKEN` secret。
|
||||
产物位于 `dist/`,覆盖 Linux、macOS 和 Windows 的 amd64/arm64,并附带 `checksums.txt`。推送 `master` 分支时,Gitea Actions 会构建全部 CLI 产物并校验校验和。
|
||||
|
||||
## 运行
|
||||
|
||||
|
||||
Reference in New Issue
Block a user