-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit eca199e
Showing
7 changed files
with
1,029 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,70 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
name: Release - ${{ matrix.platform.release_for }} | ||
runs-on: ${{ matrix.platform.os }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- release_for: Linux-x86_64 | ||
os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
bin: sshproxygen | ||
name: sshproxygen-linux-amd64 | ||
|
||
- release_for: Linux-aarch64 | ||
os: ubuntu-latest | ||
target: aarch64-unknown-linux-gnu | ||
bin: sshproxygen | ||
name: sshproxygen-linux-arm64 | ||
use_cross: true | ||
|
||
- release_for: macOS-x86_64 | ||
os: macos-latest | ||
target: x86_64-apple-darwin | ||
bin: sshproxygen | ||
name: sshproxygen-macos-amd64 | ||
|
||
- release_for: macOS-aarch64 | ||
os: macos-latest | ||
target: aarch64-apple-darwin | ||
bin: sshproxygen | ||
name: sshproxygen-macos-arm64 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: ${{ matrix.platform.target }} | ||
|
||
- name: Install cross | ||
if: ${{ matrix.platform.use_cross }} | ||
run: cargo install cross | ||
|
||
- name: Build binary | ||
if: ${{ !matrix.platform.use_cross }} | ||
run: cargo build --verbose --release --target ${{ matrix.platform.target }} | ||
|
||
- name: Build binary using cross | ||
if: ${{ matrix.platform.use_cross }} | ||
run: cross build --verbose --release --target ${{ matrix.platform.target }} | ||
|
||
- name: Prepare binary | ||
run: | | ||
cd target/${{ matrix.platform.target }}/release | ||
cp ${{ matrix.platform.bin }} ${{ matrix.platform.name }} | ||
- name: Upload binaries to release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: target/${{ matrix.platform.target }}/release/${{ matrix.platform.name }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 @@ | ||
/target |
Oops, something went wrong.