File tree Expand file tree Collapse file tree 4 files changed +23
-10
lines changed Expand file tree Collapse file tree 4 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- out_dir= " /tmp/zigcli-release/ "
4
- version =${RELEASE_VERSION:- unknown}
3
+ OUT_DIR= ${OUT_DIR :- / tmp/ zigcli}
4
+ VERSION =${RELEASE_VERSION:- unknown}
5
5
6
6
set -Eeuo pipefail
7
7
trap cleanup SIGINT SIGTERM ERR EXIT
8
8
cleanup () {
9
9
trap - SIGINT SIGTERM ERR EXIT
10
- ls -ltrh " ${out_dir } "
11
- rm -rf " ${out_dir } /*"
10
+ ls -ltrh " ${OUT_DIR } "
11
+ rm -rf " ${OUT_DIR } /*"
12
12
}
13
13
14
- mkdir -p " ${out_dir } "
14
+ mkdir -p " ${OUT_DIR } "
15
15
script_dir=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd -P)
16
16
17
17
cd " ${script_dir} /.."
@@ -28,11 +28,15 @@ targets=(
28
28
export BUILD_DATE=$( date +' %Y-%m-%dT%H:%M:%S%z' )
29
29
export GIT_COMMIT=$( git rev-parse --short HEAD)
30
30
31
+ pandoc -f org -t markdown README.org -o README.md
32
+
31
33
for target in " ${targets[@]} " ; do
32
34
echo " Building for ${target} ..."
35
+ rm -rf zig-out/
33
36
zig build -Doptimize=ReleaseSafe -Dtarget=" ${target} " \
34
37
-Dgit_commit=${GIT_COMMIT} -Dbuild_date=${BUILD_DATE} -Dis_ci=true
38
+ rm -f zig-out/bin/* demo
35
39
pushd zig-out
36
- zip -r zigcli-${version } -${target} .zip bin ../LICENSE ../README.org
40
+ zip -r ${OUT_DIR} / zigcli-${VERSION } -${target} .zip bin ../LICENSE ../README.md
37
41
popd
38
42
done
Original file line number Diff line number Diff line change 9
9
permissions :
10
10
contents : write
11
11
12
+ env :
13
+ OUT_DIR : /tmp/zigcli-release
14
+
12
15
jobs :
13
16
upload-assets :
14
17
runs-on : ubuntu-latest
@@ -21,11 +24,15 @@ jobs:
21
24
- name : Set env
22
25
run : |
23
26
echo "RELEASE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
27
+ - name : Install
28
+ uses : pandoc/actions/setup@v1
29
+ with :
30
+ version : 2.19
24
31
- name : Build
25
32
run : |
26
33
bash .github/build-release.sh
27
34
- name : Release
28
35
uses : softprops/action-gh-release@v2
29
36
if : startsWith(github.ref, 'refs/tags/')
30
37
with :
31
- files : /tmp/zigcli-release /*
38
+ files : ${{ env.OUT_DIR }} /*
Original file line number Diff line number Diff line change 3
3
/.zig-cache
4
4
* lock
5
5
docs /resources
6
- docs /public
6
+ docs /public
7
+ README.md
Original file line number Diff line number Diff line change 1
1
#+TITLE: Programs
2
2
#+DATE: 2023-10-21T12:26:45+0800
3
- #+LASTMOD: 2024-09-01T09:57:50 +0800
3
+ #+LASTMOD: 2024-09-28T11:50:42 +0800
4
4
#+TYPE: docs
5
5
#+WEIGHT: 20
6
6
#+DESCRIPTION: Binary programs which can be used directly
7
7
8
8
* Install
9
- Prebuilt binaries can be found in [[https://github.com/jiacai2050/zigcli/actions/workflows/binary.yml][CI's artifacts]], or you can build from source:
9
+ Latest pre-built binaries can be downloaded on the [[https://github.com/jiacai2050/zigcli/releases][release page]], or you can build from source:
10
+
10
11
#+begin_src bash
11
12
git clone https://github.com/jiacai2050/zigcli.git
12
13
#+end_src
You can’t perform that action at this time.
0 commit comments