-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (60 loc) · 2.05 KB
/
push.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
name: Release binaries
on:
push:
tags:
- '*'
jobs:
job_build-linux-x86_64: # Build binary for linux and create release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Create release
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: v${{ github.ref }}
body: |
This release is created by GitHub Actions automatically.
draft: false
prerelease: false
- name: Install linux-x86_64 toolchains
uses: actions-rs/[email protected]
with:
toolchain: nightly
target: x86_64-unknown-linux-musl
override: true
- name: Build linux-x86_64 binary
run: "cargo build --target x86_64-unknown-linux-musl --release"
- name: Move linux-x86_64 binary
run: "mv target/x86_64-unknown-linux-musl/release/trigger trigger-linux-x86_64"
- name: Upload linux-x86_64 binary
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./trigger-linux-x86_64
asset_name: trigger-linux-x86_64
asset_content_type: application/octet-stream
- name: Install linux-i686 toolchains
uses: actions-rs/[email protected]
with:
toolchain: nightly
target: i686-unknown-linux-musl
override: true
- name: Build linux-i686 binary
run: "cargo build --target i686-unknown-linux-musl --release"
- name: Move linux-i686 binary
run: "mv target/i686-unknown-linux-musl/release/trigger trigger-linux-i686"
- name: Upload linux-i686 binary
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./trigger-linux-i686
asset_name: trigger-linux-i686
asset_content_type: application/octet-stream