-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (71 loc) · 3.03 KB
/
cd.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build and Release
on:
push:
tags:
- "v*"
jobs:
# This builds and releases for Windows, MacOS, and Linux
usu-build-release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: tribble
asset_name: tribble-linux-amd64
- os: macos-latest
artifact_name: tribble
asset_name: tribble-macos-amd64
- os: windows-latest
artifact_name: tribble.exe
asset_name: tribble-windows-amd64
steps:
- uses: actions/checkout@v2
- run: cargo install bonnie
- run: bonnie ci prep
- name: Build
run: bonnie build
- name: Release binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
body: "The below binaries/executables are for the Tribble CLI. See [CHANGELOG.md](./CHANGELOG.md) for details of the changes in this version."
# This builds and releases for musl
musl-build-release:
runs-on: ubuntu-latest # We cross-compile from Ubuntu
steps:
- uses: actions/checkout@v2
- name: Install musl toolchain
run: rustup target add x86_64-unknown-linux-musl
- run: cargo install bonnie
- run: bonnie ci prep
- name: Build
run: bonnie build --target x86_64-unknown-linux-musl
- name: Release binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/x86_64-unknown-linux-musl/release/tribble
asset_name: tribble-musl-amd64
tag: ${{ github.ref }}
body: "The below binaries/executables are for the Tribble CLI. See [CHANGELOG.md](./CHANGELOG.md) for details of the changes in this version."
# Builds the JSON schema
build-schema:
runs-on: ubuntu-latest # We cross-compile from Ubuntu
steps:
- uses: actions/checkout@v2
- run: cargo install bonnie
# We don't need to run the usual CI preparation for this one
- name: Build
run: bonnie schema
- name: Release schema
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: schema.json
asset_name: tribble-schema.json
tag: ${{ github.ref }}
body: "The below binaries/executables are for the Tribble CLI. See [CHANGELOG.md](./CHANGELOG.md) for details of the changes in this version."