Skip to content

feat: relicensing

feat: relicensing #12

Workflow file for this run

name: publish-to-pypi
on:
push:
branches:
- develop
- main
paths:
- src/**
- .github/workflows/package.yaml
- README.md
release:
types:
- published
pull_request:
branches:
- develop
- main
paths:
- src/**
permissions:
contents: read
packages: write
jobs:
deploy:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
- name: Install dependencies
run: |
# python -m pip install --upgrade pip
# python -m pip install --upgrade pip
pip install hatch
- name: Build package
run: "hatch build \n"
- name: Test package
run: |
# hatch test
pip install nose2
pip install -e .
nose2
- name: Publish package distributions to PyPI (main)
if: github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://upload.pypi.org/legacy/
- name: Publish package distributions to PyPI (develop)
if: github.ref != 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/