Release 0.3.32 #4
Workflow file for this run
This file contains hidden or 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: GitHub Release | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| workflow_dispatch: | |
| env: | |
| # The smbcloud-cli binary name | |
| PROJECT_NAME: smb | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - name: linux-amd64 | |
| runner: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - name: win-amd64 | |
| runner: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| #- name: macos-amd64 | |
| # runner: macos-latest | |
| # target: x86_64-apple-darwin | |
| - name: macos-arm64 | |
| runner: macos-latest | |
| target: aarch64-apple-darwin | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: 1.92 | |
| targets: "${{ matrix.target }}" | |
| #- name: Install OpenSSL | |
| # if: matrix.name == 'macos-amd64' | |
| # run: brew install openssl@3 | |
| - name: Setup Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Create .env file | |
| run: | | |
| touch .env | |
| echo CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }} >> .env | |
| cat .env | |
| - name: Build Binary | |
| run: cargo build --verbose --locked --release --target ${{ matrix.target }} | |
| - name: Release Binary | |
| shell: bash | |
| run: | | |
| BIN_SUFFIX="" | |
| if [[ "${{ matrix.runner }}" == "windows-latest" ]]; then | |
| BIN_SUFFIX=".exe" | |
| fi | |
| # The built binary output location | |
| BIN_OUTPUT="target/${{ matrix.target }}/release/${PROJECT_NAME}${BIN_SUFFIX}" | |
| # Define a better name for the final binary | |
| BIN_RELEASE="${PROJECT_NAME}-${{ matrix.name }}${BIN_SUFFIX}" | |
| BIN_RELEASE_VERSIONED="${PROJECT_NAME}-${{ github.ref_name }}-${{ matrix.name }}${BIN_SUFFIX}" | |
| # Move the built binary where you want it | |
| DEST_DIR="./release" | |
| mkdir -p "${DEST_DIR}" | |
| mv "${BIN_OUTPUT}" "${DEST_DIR}/${BIN_RELEASE}" | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: github.ref_type == 'tag' | |
| with: | |
| files: release/* |