-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Showing
5 changed files
with
428 additions
and
320 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,13 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
# Check for updates to GitHub Actions every weekday | ||
interval: "weekly" | ||
|
||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
# Check for updates managed by Composer once a week | ||
interval: "weekly" |
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
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,106 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish-linux: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Build amd64 | ||
run: cargo build --release | ||
|
||
- name: Prepare amd64 binary | ||
run: | | ||
mv target/release/discrakt target/release/discrakt_amd64 | ||
chmod +x target/release/discrakt_amd64 | ||
- name: Build arm64 | ||
run: cargo build --release --target=aarch64-unknown-linux-musl | ||
|
||
- name: Prepare arm64 Binary | ||
run: | | ||
mv target/aarch64-unknown-linux-musl/release/discrakt target/release/discrakt_arm64 | ||
chmod +x target/release/discrakt_arm64 | ||
- name: Upload binaries | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ github.ref_name }} target/release/discrakt_arm64 | ||
gh release upload ${{ github.ref_name }} target/release/discrakt_amd64 | ||
publish-win: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Build win64 | ||
run: cargo build --release | ||
|
||
- name: Prepare win64 Binary | ||
run: mv target/release/discrakt.exe target/release/discrakt_win64.exe | ||
|
||
- name: Create silent win64 executable | ||
run: sed -i '1i\#\!\[windows_subsystem\ \=\ \"windows\"\]' src/main.rs | ||
|
||
- name: Build silent win64 executable | ||
run: cargo build --release | ||
|
||
- name: Prepare silent win64 Binary | ||
run: mv target/release/discrakt.exe target/release/discrakt_win64_silent.exe | ||
|
||
- name: Upload binaries | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ github.ref_name }} target/release/discrakt_win64_silent.exe | ||
gh release upload ${{ github.ref_name }} target/release/discrakt_win64.exe | ||
publish-mac: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: "aarch64-apple-darwin, x86_64-apple-darwin" | ||
|
||
- name: Build darwin | ||
run: cargo build --release --target=x86_64-apple-darwin | ||
|
||
- name: Prepare darwin binary | ||
run: | | ||
mv target/x86_64-apple-darwin/release/discrakt target/release/discrakt_darwin | ||
chmod +x target/release/discrakt_darwin | ||
- name: Build darwin arm64 | ||
run: cargo build --release --target=aarch64-apple-darwin | ||
|
||
- name: Prepare darwin arm64 binary | ||
run: | | ||
mv target/aarch64-apple-darwin/release/discrakt target/release/discrakt_darwin_arm64 | ||
chmod +x target/release/discrakt_darwin_arm64 | ||
- name: Upload binaries | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ github.ref_name }} target/release/discrakt_darwin_arm64 | ||
gh release upload ${{ github.ref_name }} target/release/discrakt_darwin |
Oops, something went wrong.