-
-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (50 loc) · 1.58 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
name: Release
on:
push:
tags: ["[0-9]+.[0-9]+.[0-9]+*"]
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Install cargo-generate-rpm
run: cargo install cargo-generate-rpm
- name: Test
run: cargo test --release
- name: Build .deb
run: cargo deb -v -o ./commit_${GITHUB_REF##*/}_amd64.deb
- name: Upload .deb package
run: |
chmod +x ./.github/workflows/upload_asset.sh
./.github/workflows/upload_asset.sh \
"alt-art/commit" ./commit_${GITHUB_REF##*/}_amd64.deb $GITHUB_TOKEN
- name: Build .rpm
run: cargo generate-rpm -o ./commit_${GITHUB_REF##*/}_x86_64.rpm
- name: Upload .rpm package
run: |
chmod +x ./.github/workflows/upload_asset.sh
./.github/workflows/upload_asset.sh \
"alt-art/commit" ./commit_${GITHUB_REF##*/}_x86_64.rpm $GITHUB_TOKEN
windows:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: Test
run: cargo test --release
- name: Build
run: cargo build --release
- name: Upload portable executable
run: |
cp ./target/release/commit.exe ./commit-${GITHUB_REF##*/}-portable.exe
./.github/workflows/upload_asset.sh \
"alt-art/commit" ./commit-${GITHUB_REF##*/}-portable.exe $GITHUB_TOKEN