-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.73 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
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
discussions: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Install post-build dependencies
run: |
sudo apt-get update
sudo apt-get install -y tar zstd
- name: Move tab completion files
run: |
mkdir -p sources/completions
mv target/release/osu-helper-script sources/
mv target/release/tab_completions/_osu-helper-script sources/completions/zsh
mv target/release/tab_completions/osu-helper-script.bash sources/completions/bash
mv target/release/tab_completions/osu-helper-script.fish sources/completions/fish
- name: Package sources directory with tar.zst
run: tar --zstd -cvf "sources.tar.zst" -C sources/ .
- name: Checksum values for binary and sources
run: |
echo "## Checksum" >> BODY.md
echo "SHA256 for \`sources.tar.zst\`: \`$(sha256sum sources.tar.zst | awk '{ print $1 }')\`" > BODY.md
echo "SHA256 for \`osu-helper-script\`: \`$(sha256sum sources/osu-helper-script | awk '{ print $1 }')"\` >> BODY.md
- name: Create release
uses: softprops/action-gh-release@v1
with:
body_path: ./BODY.md
files: |
sources/osu-helper-script
sources.tar.zst