-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2400d1
commit 68e80b6
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
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: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ${{ env.binary }}.zip | ||
asset_name: ${{ env.binary }}-linux-${{ github.ref }}.zip | ||
tag: ${{ github.ref }} | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters