Skip to content

Commit

Permalink
Add Rust workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Tao Lu committed Jan 25, 2023
1 parent 520ed21 commit 185c38e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Create python release
name: Create Python release

on:
push:
tags:
- 'v*'
- 'v0.0.*'

jobs:
build:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/release-rust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Create Rust release

on:
push:
tags:
- 'v0.1.*'

env:
CARGO_TERM_COLOR: always

jobs:
build:
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
asset: ozy-Linux-x86_64

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
- if: ${{ contains(matrix.target, '-musl') }}
run: sudo apt-get install musl-tools
- name: Build
run: cargo build --release --verbose --target=${{ matrix.target }} --manifest-path rozy/Cargo.toml
- name: Rename
run: mv rozy/target/${{ matrix.target }}/release/ozy rozy/target/${{ matrix.target }}/release/${{ matrix.asset }}
- name: Upload binaries to release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
files: rozy/target/${{ matrix.target }}/release/${{ matrix.asset }}

0 comments on commit 185c38e

Please sign in to comment.