-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include SIGKILL. Add GitHub Actions.
- Loading branch information
1 parent
09cdbd1
commit a1aa0e8
Showing
4 changed files
with
97 additions
and
5 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,51 @@ | ||
name: Release Rust Application | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Release for ${{ matrix.target }} | ||
strategy: | ||
matrix: | ||
include: | ||
- target: aarch64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
archive: linux-arm64 | ||
- target: aarch64-apple-darwin | ||
os: macos-latest | ||
archive: darwin-arm64 | ||
- target: x86_64-apple-darwin | ||
os: macos-latest | ||
archive: darwin-x86_64 | ||
- target: x86_64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
archive: linux-x86_64 | ||
- target: x86_64-pc-windows-msvc | ||
os: windows-latest | ||
archive: windows-x86_64 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- shell: bash | ||
run: | | ||
# Update the version in Cargo.toml | ||
TAG_NAME="${{ github.event.release.tag_name }}" | ||
TAG_NAME="${TAG_NAME#v}" | ||
if [[ "${{ runner.os }}" == "macOS" ]]; then | ||
sed -i"" -e "s/^version = .*/version = \"$TAG_NAME\"/" Cargo.toml | ||
else | ||
sed -i -e "s/^version = .*/version = \"$TAG_NAME\"/" Cargo.toml | ||
fi | ||
- uses: taiki-e/upload-rust-binary-action@v1 | ||
with: | ||
bin: gc-rust | ||
archive: $bin-$tag-${{ matrix.archive }} | ||
target: ${{ matrix.target }} | ||
tar: unix | ||
zip: windows | ||
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,21 @@ | ||
name: Test Rust Application | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Run tests | ||
run: cargo test |
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
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