chore: test target #7
Workflow file for this run
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
name: Release | |
on: | |
release: | |
types: [created] | |
push: | |
jobs: | |
publish-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: "aarch64-unknown-linux-musl, x86_64-unknown-linux-musl" | |
- 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: | | |
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc | |
export CC=aarch64-linux-gnu-gcc | |
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 | |
if: false | |
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@v4 | |
- 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 | |
if: false | |
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-14 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- 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 | |
if: false | |
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 |