Skip to content

Commit

Permalink
Update cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Piturnah authored Dec 28, 2022
1 parent 60d0f5a commit 5fcbb54
Showing 1 changed file with 14 additions and 31 deletions.
45 changes: 14 additions & 31 deletions .github/workflows/cd.yml
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

0 comments on commit 5fcbb54

Please sign in to comment.