Skip to content

Commit 5620db2

Browse files
author
Administrator
committed
fix release yml
1 parent 183b54e commit 5620db2

File tree

3 files changed

+51
-19
lines changed

3 files changed

+51
-19
lines changed

.github/workflows/release.yml

+22-19
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
1-
name: release
2-
1+
name: Release wechat-webhook binary
32
on:
43
push:
5-
branches:
6-
- "master"
74
tags:
8-
- "*" # 匹配所有的 tag 推送
9-
permissions:
10-
contents: write # 必须允许对内容的写权限,这样才能发布 release 和上传文件
5+
- 'v*'
6+
- 'draft-*'
117

128
jobs:
13-
releases-linux-binaries:
14-
name: Release Go Binaries
9+
publishGitRelease:
1510
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
goos: [linux, darwin]
19-
goarch: [amd64, arm64]
2011
steps:
21-
- uses: actions/checkout@v2
22-
- uses: wangyoucao577/[email protected]
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-go@v5
14+
with:
15+
go-version: '^1.17'
16+
check-latest: true
17+
18+
- name: Cross compile
19+
run: |
20+
sudo apt-get install rhash -y
21+
go install github.com/mitchellh/[email protected]
22+
mkdir -p build
23+
./scripts/xcompile.sh
24+
25+
- name: Release
26+
uses: softprops/action-gh-release@v1
2327
with:
24-
github_token: ${{ secrets.LGITHUB_TOKEN }}
25-
goos: ${{ matrix.goos }}
26-
goarch: ${{ matrix.goarch }}
27-
goversion: 1.17
28+
files: build/*
29+
draft: true
30+
fail_on_unmatched_files: true

scripts/generate-man-page-md.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#! /bin/bash
2+
set -e
3+
4+
# note that this requires pandoc to be installed.
5+
6+
cat ./pkg/yqlib/doc/operators/headers/Main.md > man.md
7+
printf "\n# HOW IT WORKS\n" >> man.md
8+
tail -n +2 how-it-works.md >> man.md
9+
10+
for f in ./pkg/yqlib/doc/operators/*.md; do
11+
cat "$f" >> man.md
12+
done
13+
14+
for f in ./pkg/yqlib/doc/usage/*.md; do
15+
cat "$f" >> man.md
16+
done

scripts/xcompile.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
set -e
3+
# you may need to go install github.com/mitchellh/[email protected] first
4+
echo $VERSION
5+
CGO_ENABLED=0 gox -ldflags "-s -w ${LDFLAGS}" -output="build/easycmd_{{.OS}}_{{.Arch}}" --osarch="darwin/amd64 darwin/arm64 linux/386 linux/amd64 linux/arm linux/arm64"
6+
7+
cd build
8+
9+
rhash -r -a . -o checksums
10+
11+
rhash -r -a --bsd . -o checksums-bsd
12+
13+
rhash --list-hashes > checksums_hashes_order

0 commit comments

Comments
 (0)