-
Notifications
You must be signed in to change notification settings - Fork 26
43 lines (41 loc) · 1.24 KB
/
build.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
name: Build Example
on:
workflow_dispatch: {}
env:
binary: shrs_example
jobs:
release_linux:
runs-on: ubuntu-latest
steps:
- uses: little-core-labs/[email protected]
id: get_version
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
- name: Build
run: |
cargo build --release --target x86_64-unknown-linux-gnu
- name: Prepare package
run: |
mkdir linux
cp target/x86_64-unknown-linux-gnu/release/shrs_example linux/
chmod +x linux/shrs_example
- name: Package as a zip
uses: vimtor/action-zip@v1
with:
files: linux
dest: ${{ env.binary }}.zip
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
release_name: nightly build ${{ github.sha }}
prerelease: true
body: Development build of the example shell
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.binary }}.zip
asset_name: ${{ env.binary }}-linux-${{ github.sha }}.zip
tag: ${{ github.ref }}
overwrite: true