-
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
1 parent
e490b42
commit 355d55c
Showing
1 changed file
with
58 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,58 @@ | ||
name: Build and Publish BuildIt Release | ||
|
||
on: | ||
workflow_dispatch: # hope this works :) | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
rust: [stable] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Rust | ||
uses: actions/setup-rust@v1 | ||
with: | ||
rust-version: stable | ||
|
||
- name: Install cargo-bundle | ||
run: cargo install cargo-bundle | ||
|
||
- name: Build for ${{ matrix.os }} | ||
run: | | ||
if [ "${{ matrix.os }}" == "windows-latest" ]; then | ||
cargo build --release --target x86_64-pc-windows-msvc | ||
elif [ "${{ matrix.os }}" == "macos-latest" ]; then | ||
cargo build --release --target x86_64-apple-darwin | ||
else | ||
cargo build --release --target x86_64-unknown-linux-gnu | ||
fi | ||
- name: Archive release binaries | ||
run: | | ||
if [ "${{ matrix.os }}" == "windows-latest" ]; then | ||
mkdir release && mv target/x86_64-pc-windows-msvc/release/* release/ | ||
elif [ "${{ matrix.os }}" == "macos-latest" ]; then | ||
mkdir release && mv target/x86_64-apple-darwin/release/* release/ | ||
else | ||
mkdir release && mv target/x86_64-unknown-linux-gnu/release/* release/ | ||
fi | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: release/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Release Description | ||
run: | | ||
curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-d '{"body": "v1.0!!"}' \ | ||
"https://api.github.com/repos/${{ github.repository }}/releases/latest" |