-
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.
update(crates): Update dependencies feat(ci): Impl build and release executables
- Loading branch information
Showing
6 changed files
with
1,321 additions
and
586 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,60 @@ | ||
name: Build and Release for Windows, Linux and MacOS | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.platform.os }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- target: x86_64-unknown-linux-gnu | ||
bin: pre-commit | ||
bin_name: pre-commit_upordawn | ||
os: ubuntu-latest | ||
- target: x86_64-apple-darwin | ||
bin: pre-commit | ||
bin_name: pre-commit_upordawn | ||
os: macOS-latest | ||
- target: x86_64-pc-windows-gnu | ||
bin: pre-commit.exe | ||
bin_name: pre-commit_upordawn.exe | ||
os: windows-latest | ||
- target: i686-pc-windows-msvc | ||
bin: pre-commit.exe | ||
bin_name: pre-commit_upordawn.exe | ||
os: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.platform.target }} | ||
override: true | ||
|
||
- name: Build | ||
uses: houseabsolute/actions-rust-cross@v0 | ||
with: | ||
command: build | ||
target: ${{ matrix.platform.target }} | ||
args: "--release" | ||
|
||
- name: Create target dir & Move binary | ||
run: | | ||
mkdir -p release_assets/${{ matrix.platform.os }} | ||
mv target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin_name }} release_assets/${{ matrix.platform.os }}/${{ matrix.platform.bin }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
token: ${{ secrets.token }} | ||
files: release_assets/${{ matrix.platform.os }}/${{ matrix.platform.bin }} | ||
body: | | ||
Release for ${{ matrix.platform.os }} target ${{ matrix.platform.target }} | ||
tag_name: ${{ matrix.platform.target }} | ||
draft: false | ||
prerelease: false |
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 @@ | ||
.git/ |
Oops, something went wrong.