-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (42 loc) · 1.59 KB
/
release-mmserver.yaml
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
on:
push:
tags:
- 'mmserver-test-ci-release'
name: Release mmserver
jobs:
create_release:
name: Create mmserver release
runs-on: ubuntu-latest
steps:
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu
- uses: actions/checkout@v4
- uses: swatinem/rust-cache@v2
with:
workspaces: |
mm-server
mm-client
mm-protocol
- name: install deps
run: sudo apt install nasm cmake protobuf-compiler libxkbcommon-dev
- name: cargo build
run: (cd mm-server && cargo build --bin mmserver --release --target x86_64-unknown-linux-gnu)
- name: create release tarball
run: |-
mkdir "${RUNNER_TMP}/${GITHUB_REF_NAME}"
cp -r mm-server/target/release/mmserver README.md "${RUNNER_TMP}/${GITHUB_REF_NAME}"
cp LICENSES/BUSL-1.1.txt "${RUNNER_TMP}/${GITHUB_REF_NAME}/LICENSE.txt"
tar -C "${RUNNER_TMP}" --numeric-owner -cvzf "${GITHUB_REF_NAME}-linux-amd64.tar.gz" "$GITHUB_REF_NAME"
- name: install git-cliff
run: cargo install git-cliff
- name: generate release notes
run: |-
echo "Server version ${GITHUB_REF_NAME/mmserver-v//}" >> release-notes.txt
git cliff -c .github/workflows/cliff.toml --include-path "mm-server/**/*" | tail -n +2 >> release-notes.txt
- name: create release
uses: softprops/action-gh-release@v2
with:
body_path: release-notes.txt
files: "mmserver-*.tar.gz"
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}