Add resource measurement for “tasks” #658
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Distribution | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
release: | |
types: [published] | |
jobs: | |
dist: | |
name: Build Packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Fetch Git tags | |
run: git fetch --tags | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install Python deps | |
run: pip install -U build | |
- name: Build distribution | |
run: | | |
python -m build -o dist lenskit | |
python -m build -o dist lenskit-funksvd | |
python -m build -o dist lenskit-implicit | |
python -m build -o dist lenskit-hpf | |
- name: Save archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pypi-pkgs | |
path: dist | |
- name: List dist dir | |
run: ls -R dist | |
pypi-publish: | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
needs: [dist] | |
if: github.event_name == 'release' | |
environment: release | |
permissions: | |
id-token: write | |
steps: | |
- name: Fetch compiled package distributions | |
uses: actions/download-artifact@v4 | |
with: | |
name: pypi-pkgs | |
path: dist | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |