blob: f02db1beb65a9ab9ed89e8bc2bea6a73af8f1422 (
plain) (
blame)
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*
jobs:
release:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
bin: sentrum
name: sentrum-${{ github.ref_name }}-linux-x86_64.tar.gz
- os: windows-latest
bin: sentrum.exe
name: sentrum-${{ github.ref_name }}-windows-x86_64.zip
- os: macos-latest
bin: sentrum
name: sentrum-${{ github.ref_name }}--darwin-x86_64.tar.gz
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- run: cargo build --release
- name: Package
shell: bash
run: |
strip target/release/${{ matrix.bin }}
if [[ "${{ matrix.os }}" == "windows-latest" ]]
then
7z a ${{ matrix.name }} target/release/${{ matrix.bin }} sentrum.sample.toml contrib/sentrum.service
else
tar czvf ${{ matrix.name }} target/release/${{ matrix.bin }} sentrum.sample.toml contrib/sentrum.service
fi
- name: Generate Changelog
run: utils/generate_changelog.sh ${{ github.ref_name }} > ${{ github.workspace }}-CHANGELOG.md
- name: Publish
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: ${{ github.workspace }}-CHANGELOG.md
draft: true
fail_on_unmatched_files: true
files: sentrum-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|