Skip to content

Commit

Permalink
(master) build action
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPicklePinosaur committed Apr 30, 2023
1 parent d2400d1 commit 68e80b6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
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
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ default: debug
debug:
cargo +nightly run shrs_example

build:
cargo build --release --target x86_64-unknown-linux-gnu

install:
cargo install --profile=release --path shrs_example

Expand Down

0 comments on commit 68e80b6

Please sign in to comment.