name: CI on: push: branches: [main] tags: ["v*"] pull_request: permissions: contents: read jobs: test: strategy: fail-fast: false matrix: os: [windows-latest, ubuntu-latest] python: ["3.9", "3.12"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - run: python -m pip install -r requirements.txt pytest - run: python -m pytest -q windows-exe: needs: test runs-on: windows-latest permissions: contents: write steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.12" - run: python -m pip install -r requirements-dev.txt - run: python scripts/build.py - uses: actions/upload-artifact@v4 with: name: SyncPulseScaleBridge path: | dist/SyncPulseScaleBridge.exe dist/SyncPulseScaleBridge.exe.sha256 - name: Attach to the release if: startsWith(github.ref, 'refs/tags/v') shell: bash env: GH_TOKEN: ${{ github.token }} run: | gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1 || gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes-file CHANGELOG.md gh release upload "$GITHUB_REF_NAME" dist/SyncPulseScaleBridge.exe dist/SyncPulseScaleBridge.exe.sha256 --clobber