-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (43 loc) · 1.18 KB
/
cli.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: Build and Publish
on:
push:
branches: ["master"]
tags:
- "*"
permissions:
contents: write
jobs:
build-and-publish:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-20.04
artifact_name: share-cli
asset_name: share-cli-linux-amd64
- os: windows-latest
artifact_name: share-cli.exe
asset_name: share-cli-windows-amd64.exe
- os: macos-latest
artifact_name: share-cli
asset_name: share-cli-macos-amd64
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Protoc
uses: arduino/setup-protoc@v3
env:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: cargo build --release
- name: Publish
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: CLI
overwrite: true