From d5709df172335b7a835cf6f5939a36e9893d6a9d Mon Sep 17 00:00:00 2001 From: Dave Rolsky Date: Sat, 21 Sep 2024 12:00:40 -0500 Subject: [PATCH] Show use of actions-rust-release in README.md --- README.md | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 493b60e..04f1f88 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ This action lets you easily cross-compile Rust projects using [cross](https://github.com/cross-rs/cross). -Here's an example from the release workflow for -[my tool `precious`](https://github.com/houseabsolute/precious): +Here's a simplified example from the test and release workflow for +[my tool `ubi`](https://github.com/houseabsolute/ubi): ```yaml jobs: @@ -13,28 +13,15 @@ jobs: strategy: matrix: platform: - - release_for: FreeBSD-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_name: Windows-x86_64 os: windows-latest target: x86_64-pc-windows-msvc - bin: precious.exe - name: precious-Windows-x86_64.zip - command: both - - - release_for: macOS-x86_64 + skip_tests: true + - os_name: macOS-x86_64 os: macOS-latest 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 }} steps: @@ -47,8 +34,12 @@ jobs: target: ${{ matrix.platform.target }} args: "--locked --release" strip: true - - # more packaging stuff goes here ... + - name: Publish artifacts and release + uses: houseabsolute/actions-rust-release@v0 + with: + binary-name: ubi + target: ${{ matrix.platform.target }} + if: matrix.toolchain == 'stable' ``` ## Input Parameters