-
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
nimaaskarian
committed
Feb 1, 2024
1 parent
b59ebc7
commit c95e2cf
Showing
1 changed file
with
11 additions
and
37 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 |
---|---|---|
@@ -1,48 +1,22 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-and-release: | ||
release: | ||
name: Release ${{ matrix.target }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [x86_64-pc-windows-gnu, x86_64-unknown-linux-musl] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Rust | ||
uses: actions/setup-rust@v1 | ||
|
||
- name: Build for Linux | ||
run: cargo build --release --target x86_64-unknown-linux-gnu | ||
|
||
- name: Build for Windows | ||
run: cargo build --release --target x86_64-pc-windows-msvc | ||
|
||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
- uses: actions/checkout@v2 | ||
- name: Compile and release | ||
uses: rust-build/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: | | ||
Changes in this release. | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Linux build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: c3.x86.linux | ||
path: target/x86_64-unknown-linux-gnu/release/c3 | ||
|
||
- name: Upload Windows build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: c3.x86_64.windows.exe | ||
path: target/x86_64-pc-windows-msvc/release/c3 | ||
RUSTTARGET: ${{ matrix.target }} | ||
EXTRA_FILES: "README.md LICENSE" |