dioxus/.github/workflows/cli_release.yml
dependabot[bot] b7638f31a6
Bump actions/checkout from 3 to 4 (#1452)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 08:32:40 -05:00

54 lines
1.5 KiB
YAML

name: Build CLI for Release
# Will run automatically on every new release
on:
release:
types: [published]
jobs:
build-and-upload:
permissions:
contents: write
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
- {
target: x86_64-pc-windows-msvc,
os: windows-latest,
toolchain: "1.70.0",
}
- {
target: x86_64-apple-darwin,
os: macos-latest,
toolchain: "1.70.0",
}
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest,
toolchain: "1.70.0",
}
steps:
- uses: actions/checkout@v4
- name: Install stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.platform.toolchain }}
targets: ${{ matrix.platform.target }}
# Setup the Github Actions Cache for the CLI package
- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
workspaces: packages/cli -> ../../target
# This neat action can build and upload the binary in one go!
- name: Build and upload binary
uses: taiki-e/upload-rust-binary-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
target: ${{ matrix.platform.target }}
bin: dx
archive: dx-${{ matrix.platform.target }}
checksum: sha256
manifest_path: packages/cli/Cargo.toml