Skip to content

v0.3.0

v0.3.0 #21

Workflow file for this run

name: Publish Python Package
on:
release:
types: [ created ]
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Extract release version
id: get_version
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Update version in pyproject.toml
run: |
sed -i 's/^version = .*/version = "${{ env.version }}"/' pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build a binary wheel dist
run: |
python -m build
- name: Quick test of the built dist
run: |
python -c "import sign_language_datasets"
- name: Commit updated pyproject.toml
run: |
git fetch origin master
git checkout master
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add pyproject.toml
git commit -m "Bump version to ${{ env.version }}"
git push origin master
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}