123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- # Copyright 2019-2023 Tauri Programme within The Commons Conservancy
- # SPDX-License-Identifier: Apache-2.0
- # SPDX-License-Identifier: MIT
- name: publish `tauri-cli`
- env:
- MACOSX_DEPLOYMENT_TARGET: '10.13'
- on:
- workflow_dispatch:
- repository_dispatch:
- types: [publish-clirs]
- jobs:
- build:
- runs-on: ${{ matrix.config.os }}
- strategy:
- fail-fast: false
- matrix:
- config:
- - os: ubuntu-20.04
- rust_target: x86_64-unknown-linux-gnu
- ext: ''
- args: ''
- - os: macos-latest
- rust_target: x86_64-apple-darwin
- ext: ''
- args: ''
- - os: macos-latest
- rust_target: aarch64-apple-darwin
- ext: ''
- args: ''
- - os: windows-latest
- rust_target: x86_64-pc-windows-msvc
- ext: '.exe'
- args: ''
- - os: windows-latest
- rust_target: aarch64-pc-windows-msvc
- ext: '.exe'
- args: '--no-default-features --features native-tls,native-tls-vendored'
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: 'Setup Rust'
- uses: dtolnay/rust-toolchain@stable
- with:
- targets: ${{ matrix.config.rust_target }}
- - uses: Swatinem/rust-cache@v2
- with:
- key: ${{ matrix.config.rust_target }}
- - name: install Linux dependencies
- if: matrix.config.os == 'ubuntu-latest'
- run: |
- sudo apt-get update
- sudo apt-get install -y libgtk-3-dev
- - name: Build CLI
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: --manifest-path ./tooling/cli/Cargo.toml --release ${{ matrix.config.args }}
- - name: Upload CLI
- uses: actions/upload-artifact@v3
- with:
- name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }}
- path: tooling/cli/target/release/cargo-tauri${{ matrix.config.ext }}
- if-no-files-found: error
- upload:
- needs: build
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Download built CLIs
- uses: actions/download-artifact@v3
- with:
- path: outputs
- - name: Pack archives
- run: ./.scripts/ci/pack-cli.sh
- - name: Get CLI version
- run: echo "CLI_VERSION=$(cat tooling/cli/metadata.json | jq '."cli.js".version' -r)" >> $GITHUB_ENV
- - name: Publish release
- uses: softprops/action-gh-release@50195ba7f6f93d1ac97ba8332a178e008ad176aa
- with:
- tag_name: tauri-cli-v${{ env.CLI_VERSION }}
- files: |
- outputs/cargo-tauri-*.zip
- outputs/cargo-tauri-*.tgz
|