Skip to content

remove uv install from readme #14

remove uv install from readme

remove uv install from readme #14

Workflow file for this run

name: Build and Release
on:
push:
branches:
- py311-fix # Roda builds de teste neste branch
tags:
- 'v*' # Roda build e cria release oficial
workflow_dispatch: # Permite rodar manualmente pelo botão no GitHub Actions
jobs:
build:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
artifact_name: mssql-cli-windows.exe
path_sep: ";"
- os: ubuntu-latest
artifact_name: mssql-cli-linux
path_sep: ":"
- os: macos-latest # macOS Sonoma (Apple Silicon ARM64)
artifact_name: mssql-cli-macos
path_sep: ":"
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
uv pip install .
uv pip install pyinstaller requests future
- name: Install System Dependencies (macOS)
if: matrix.os == 'macos-latest'
run: brew install unixodbc
- name: Download binaries
run: uv run dev_setup.py
- name: PyInstaller Build
shell: bash
run: |
uv run pyinstaller --onefile --name "${{ matrix.artifact_name }}" \
--collect-all "mssqlcli" \
--add-data "mssqlcli/mssqltoolsservice/bin${{ matrix.path_sep }}mssqlcli/mssqltoolsservice/bin" \
--add-data "mssqlcli/packages/mssqlliterals/*.json${{ matrix.path_sep }}mssqlcli/packages/mssqlliterals" \
--hidden-import "pyodbc" \
mssqlcli/main.py
- name: Validate Binary Execution (${{ matrix.os }})
shell: bash
run: |
EXE_PATH="dist/${{ matrix.artifact_name }}"
chmod +x "$EXE_PATH"
echo "Testing binary version and engine initialization..."
"$EXE_PATH" --version
echo "Binary validation successful on ${{ matrix.os }}!"
- name: Release
# Esta trava garante que só cria a release se houver uma TAG (v1.0.0, etc)
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: dist/${{ matrix.artifact_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}