Skip to content

Toke(n)icer v0.0.4

Toke(n)icer v0.0.4 #14

Workflow file for this run

name: Release
on:
release:
types: [ published ]
repository_dispatch:
workflow_dispatch:
inputs:
upload_pypi:
description: 'upload to PyPI'
type: boolean
required: false
default: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: 'pip'
- name: Install requirements
run: pip install build setuptools twine -U
- name: Build package
run: |
python -m build --sdist
twine check dist/*
pip install dist/*
- name: Upload sdist to github artifact
uses: actions/upload-artifact@v4
with:
name: tokenicer
path: dist/*gz
- name: Upload sdist to pypi
if: (github.event_name == 'release' || github.event.inputs.upload_pypi == 'true') && !cancelled()
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_KEY }}
run: |
python -m twine upload dist/*gz
- name: Clean cache
if: always()
run: |
pip cache purge || true
rm -rf ../Tokenicer/*