-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (46 loc) · 1.18 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:
- '*'
defaults:
run:
shell: bash
jobs:
test:
uses: ./.github/workflows/test.yml
release:
runs-on: ubuntu-latest
needs: test # don't release unless tests are all passing
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: build
run: cargo build --release
- run: |
if ! test -f target/wasm32-wasi/release/datakit_filter.wasm; then
echo "missing output binary"
exit 1
fi
mv -v \
./target/wasm32-wasi/release/datakit_filter.wasm \
./datakit.wasm
mv -v \
./datakit-filter/datakit_filter.meta.json \
./datakit.meta.json
readonly BODY=./body.md
touch "$BODY"
printf '## checksums\n\n' >> "$BODY"
printf '```\n' >> "$BODY"
sha256sum \
datakit.wasm \
datakit.meta.json \
>> "$BODY"
printf '```\n' >> "$BODY"
- uses: ncipollo/release-action@v1
with:
artifacts: datakit.wasm,datakit.meta.json
makeLatest: 'true'
bodyFile: body.md