Show use of actions-rust-release in README.md
This commit is contained in:
parent
ad283b2fc6
commit
d5709df172
33
README.md
33
README.md
@ -3,8 +3,8 @@
|
|||||||
This action lets you easily cross-compile Rust projects using
|
This action lets you easily cross-compile Rust projects using
|
||||||
[cross](https://github.com/cross-rs/cross).
|
[cross](https://github.com/cross-rs/cross).
|
||||||
|
|
||||||
Here's an example from the release workflow for
|
Here's a simplified example from the test and release workflow for
|
||||||
[my tool `precious`](https://github.com/houseabsolute/precious):
|
[my tool `ubi`](https://github.com/houseabsolute/ubi):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
@ -13,28 +13,15 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
- release_for: FreeBSD-x86_64
|
- os_name: Windows-x86_64
|
||||||
os: ubuntu-20.04
|
|
||||||
target: x86_64-unknown-freebsd
|
|
||||||
bin: precious
|
|
||||||
name: precious-FreeBSD-x86_64.tar.gz
|
|
||||||
command: build
|
|
||||||
|
|
||||||
- release_for: Windows-x86_64
|
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
target: x86_64-pc-windows-msvc
|
target: x86_64-pc-windows-msvc
|
||||||
bin: precious.exe
|
skip_tests: true
|
||||||
name: precious-Windows-x86_64.zip
|
- os_name: macOS-x86_64
|
||||||
command: both
|
|
||||||
|
|
||||||
- release_for: macOS-x86_64
|
|
||||||
os: macOS-latest
|
os: macOS-latest
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
bin: precious
|
|
||||||
name: precious-Darwin-x86_64.tar.gz
|
|
||||||
command: both
|
|
||||||
|
|
||||||
# more release targets here ...
|
# more targets here ...
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform.os }}
|
runs-on: ${{ matrix.platform.os }}
|
||||||
steps:
|
steps:
|
||||||
@ -47,8 +34,12 @@ jobs:
|
|||||||
target: ${{ matrix.platform.target }}
|
target: ${{ matrix.platform.target }}
|
||||||
args: "--locked --release"
|
args: "--locked --release"
|
||||||
strip: true
|
strip: true
|
||||||
|
- name: Publish artifacts and release
|
||||||
# more packaging stuff goes here ...
|
uses: houseabsolute/actions-rust-release@v0
|
||||||
|
with:
|
||||||
|
binary-name: ubi
|
||||||
|
target: ${{ matrix.platform.target }}
|
||||||
|
if: matrix.toolchain == 'stable'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Input Parameters
|
## Input Parameters
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user