-
Notifications
You must be signed in to change notification settings - Fork 9
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
1 changed file
with
14 additions
and
31 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,47 +1,30 @@ | ||
# Used https://github.com/taiki-e/cargo-hack/blob/202e6e59d491c9202ce148c9ef423853267226db/.github/workflows/release.yml#L47-L84 as example | ||
name: CD | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
make-binaries: | ||
name: ${{ matrix.target }} | ||
bins: | ||
strategy: | ||
matrix: | ||
include: | ||
- target: aarch64-unknown-linux-gnu | ||
- target: aarch64-unknown-linux-musl | ||
- target: aarch64-apple-darwin | ||
os: macos-11 | ||
- target: x86_64-unknown-linux-gnu | ||
- target: x86_64-unknown-linux-musl | ||
- target: x86_64-apple-darwin | ||
os: macos-10.15 | ||
#- target: x86_64-pc-windows-msvc seems to be slightly broken on windows for now | ||
# os: windows-2019 | ||
runs-on: ${{ matrix.os || 'ubuntu-18.04' }} | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
#- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}" | ||
# if: endsWith(matrix.target, 'windows-msvc') | ||
- uses: taiki-e/upload-rust-binary-action@v1 | ||
- name: Build and upload Rust binary to GitHub Releases | ||
uses: taiki-e/[email protected] | ||
with: | ||
bin: gex | ||
target: ${{ matrix.target }} | ||
tar: all | ||
zip: windows | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1 | ||
CARGO_PROFILE_RELEASE_LTO: true | ||
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1 | ||
|