Skip to content

Try to fix bad path

Try to fix bad path #2

Workflow file for this run

name: Build CLI binaries
on:
pull_request:
paths:
- "cli/**"
- ".github/workflows/cli-build.yml"
push:
branches:
- dev
- prod
paths:
- "cli/**"
- ".github/workflows/cli-build.yml"
workflow_dispatch:
jobs:
build:
name: ${{ matrix.artifact_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: "3.11"
artifact_name: stacksync-linux-x64
binary_name: stacksync
artifact_path: cli/dist/stacksync-linux-x64
- os: macos-latest
python-version: "3.11"
artifact_name: stacksync-macos-arm64
binary_name: stacksync
artifact_path: cli/dist/stacksync-macos-arm64
- os: windows-latest
python-version: "3.11"
artifact_name: stacksync-windows-x64.exe
binary_name: stacksync.exe
artifact_path: cli/dist/stacksync-windows-x64.exe
defaults:
run:
working-directory: cli
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create virtual environment
shell: bash
run: python -m venv .venv
- name: Build standalone binary
if: runner.os != 'Windows'
shell: bash
run: |
source .venv/bin/activate
./scripts/build-binary.sh
- name: Build standalone binary
if: runner.os == 'Windows'
shell: pwsh
run: |
.\.venv\Scripts\python -m pip install -U pip
.\.venv\Scripts\python -m pip install -e .
.\.venv\Scripts\python -m pip install -r requirements-dev.txt
.\.venv\Scripts\python -m PyInstaller --clean --noconfirm stacksync.spec
- name: Rename release artifact
if: runner.os != 'Windows'
shell: bash
run: cp "dist/${{ matrix.binary_name }}" "dist/${{ matrix.artifact_name }}"
- name: Rename release artifact
if: runner.os == 'Windows'
shell: pwsh
run: Copy-Item "dist\${{ matrix.binary_name }}" "dist\${{ matrix.artifact_name }}"
- name: Smoke test binary
if: runner.os != 'Windows'
shell: bash
run: "./dist/${{ matrix.artifact_name }} --help"
- name: Smoke test binary
if: runner.os == 'Windows'
shell: pwsh
run: .\dist\${{ matrix.artifact_name }} --help
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_path }}
if-no-files-found: error