Spaces:
Sleeping
Sleeping
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Generate SBOM (CycloneDX) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt -r requirements-ai.txt cyclonedx-bom | |
| cyclonedx-py environment -o sbom.json | |
| # actions/create-release@v1 is archived (deprecated since 2021). | |
| # softprops/action-gh-release@v2 is the maintained replacement and | |
| # supports attaching files (we use it to upload the SBOM alongside the | |
| # release). | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| draft: true | |
| prerelease: false | |
| body: | | |
| See [CHANGELOG.md](https://github.com/Rsan0948/calculus_animator/blob/main/CHANGELOG.md) for details. | |
| A Software Bill of Materials (SBOM) is attached as `sbom.json`. | |
| files: | | |
| sbom.json | |
| build-packages: | |
| needs: create-release | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.10', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install .[dev] | |
| - name: Run tests | |
| run: pytest -m "not gui" | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-${{ matrix.os }}-py${{ matrix.python-version }} | |
| path: | | |
| dist/ | |
| build/ | |