-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (56 loc) · 1.34 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
asset_name: kpxhs-linux
- os: macos-latest
asset_name: kpxhs-macos
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install pandoc
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update
sudo apt-get install pandoc
else
brew update
brew install pandoc
fi
- name: Build docs
run: |
cd docs
make
- name: Build binary
run: make install
- name: Copy binary and rename
run: |
mkdir dist
cp ~/.local/bin/kpxhs dist
mv dist/kpxhs dist/${{ matrix.asset_name }}
- name: Generate digest
run: |
name=${{ matrix.asset_name }}
cd dist
if [ "$RUNNER_OS" == "Linux" ]; then
sha256sum "$name" > "${name}.DIGEST"
else
shasum -a 256 "$name" > "${name}.DIGEST"
fi
- uses: ncipollo/release-action@v1
with:
artifacts:
dist/${{ matrix.asset_name }},
dist/${{ matrix.asset_name }}.DIGEST,
docs/out/kpxhs.1
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true