-
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.
- Loading branch information
1 parent
4b22678
commit c5eceef
Showing
3 changed files
with
39 additions
and
2 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,37 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*.*.*' # Trigger this workflow for tags like v1.0.0 | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build_and_release: | ||
runs-on: windows-latest # Use a Windows runner | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: x86_64-pc-windows-msvc # Target for Windows | ||
|
||
- name: Build | ||
run: cargo build --release | ||
|
||
- name: Upload to GitHub Releases | ||
if: startsWith(github.ref, 'refs/tags/') # Only upload on tagged commits | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} # Provided by GitHub | ||
asset_path: ./target/x86_64-pc-windows-msvc/release/your_binary.exe # Replace with your binary name | ||
asset_name: your_binary.exe # Replace with your binary name | ||
asset_content_type: application/octet-stream |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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