Skip to content

chore: prepare v0.1.3 release\n\n- docs: update README, wiki content,… #4

chore: prepare v0.1.3 release\n\n- docs: update README, wiki content,…

chore: prepare v0.1.3 release\n\n- docs: update README, wiki content,… #4

Workflow file for this run

name: Publish to PyPI

Check failure on line 1 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

(Line: 49, Col: 1): 'name' is already defined, (Line: 51, Col: 1): 'on' is already defined, (Line: 56, Col: 1): 'permissions' is already defined, (Line: 59, Col: 1): 'jobs' is already defined
on:
push:
tags:
- 'v*'
permissions:
contents: read
id-token: write
jobs:
test-build-publish:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest build
- name: Run tests (headless)
env:
MPLBACKEND: Agg
run: pytest -q
- name: Verify tag matches version
run: |
VERSION=$(python -c "import re;print(re.search(r"""__version__\s*=\s*'([^']+)'""", open('statclean/__init__.py').read()).group(1))")
TAG=${GITHUB_REF_NAME#v}
echo "Version: $VERSION | Tag: $TAG"
if [ "$VERSION" != "$TAG" ]; then echo "Tag ($TAG) does not match version ($VERSION)" && exit 1; fi
- name: Build package
run: python -m build
- name: Publish to PyPI (Trusted Publisher)
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
name: Publish to PyPI and GitHub Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ github.ref_name }}
body: |
StatClean ${{ github.ref_name }} - A comprehensive statistical data preprocessing and outlier detection library.
See [CHANGELOG.md](https://github.com/SubaashNair/StatClean/blob/main/CHANGELOG.md) for detailed release notes.
## Installation
```
pip install statclean==${{ github.ref_name }}
```
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1