Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

pypi publish

pypi publish #50

Workflow file for this run

name: CI Pipeline
# only on tagged commits or manual trigger or on change to main.yml
on:
push:
# tags:
# - '*'
# paths:
# - .github/workflows/**.yml
branches:
- 18-improved-model-getting-and-examples
- dev
tags:
- '*'
# on push to dev or main branch if tags are pushed
jobs:
Build:
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
python-version: ["3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Clean up disk space
run: |
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sudo rm -rf /tmp/*
sudo rm -rf /var/tmp/*
df -h
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
pip install pytest
pip install -r requirements.txt
- name: Hatch build
run: |
hatch build
ls -l dist
- name: Install package and run tests
run: |
pip install dist/*.whl
pytest
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: |
dist
TestPyPI:
permissions:
id-token: write
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1

Check failure on line 70 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

invalid value workflow reference: references to workflows must be rooted in '.github/workflows'
with:
repository-url: https://test.pypi.org/legacy/