name: Build release package on: workflow_dispatch: push: tags: ["v*"] permissions: contents: read jobs: package: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v7 with: python-version: "3.12" - name: Read version id: version shell: bash run: | VERSION="$(tr -d '\r\n' < VERSION)" if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "Invalid VERSION: $VERSION" >&2 exit 1 fi echo "version=$VERSION" >> "$GITHUB_OUTPUT" - name: Verify package import run: python scripts/smoke_import.py - name: Run tests run: PYTHONPATH=tests python -m unittest discover -s tests -p "test_*.py" - name: Build installable zip run: python scripts/build_release.py - uses: actions/upload-artifact@v4 with: name: continuity-director-v${{ steps.version.outputs.version }} path: dist/continuity-director-v${{ steps.version.outputs.version }}.zip if-no-files-found: error