-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (55 loc) · 1.48 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
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
target:
- name: ocvw
path: on-chain-version-watcher
- name: wuh
path: whitelist-upgrade-hasher
steps:
- name: Fetch latest code
uses: actions/checkout@v4
- name: Build
run: cd ${{ matrix.target.path }} && cargo b -r --locked
- name: Compress
run: |
mv ${{ matrix.target.path }}/target/release/${{ matrix.target.name }} .
zstd --ultra -22 -o ${{ matrix.target.name }}.zst ${{ matrix.target.name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.target.name }}
path: ${{ matrix.target.name }}.zst
retention-days: 1
release:
name: Release
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Hash
run: |
mkdir -p artifacts
mv artifact-*/* artifacts/
cd artifacts
sha256sum * | tee ../SHA256
md5sum * | tee ../MD5
mv ../SHA256 .
mv ../MD5 .
- name: Publish
uses: softprops/action-gh-release@v1
with:
discussion_category_name: Announcements
generate_release_notes: true
files: artifacts/*