Skip to content

boneIO Black 0.9.0dev9 #266

boneIO Black 0.9.0dev9

boneIO Black 0.9.0dev9 #266

name: Publish BoneIO 🐍 distributions πŸ“¦ to PyPI
on:
push:
branches:
- 'main'
- 'dev'
paths:
- '**.py'
- '**.tsx'
- '**.ts'
- 'frontend/**'
pull_request:
branches: [main]
release:
types:
- created
- edited
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI
runs-on: ubuntu-20.04 # Using Ubuntu 20.04 which supports Python 3.7
steps:
- uses: actions/checkout@master
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Using LTS version of Node.js
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Build Frontend
working-directory: frontend
run: |
npm ci
npm run build
- uses: pdm-project/setup-pdm@v3
name: Setup Python and PDM
with:
python-version: 3.7
architecture: x64
version: 2.6.1
enable-pep582: true
- name: Install dependencies
run: |
python -m pip install -U twine
- name: Build
run: |
pdm build
- name: Publish package
if: startsWith(github.ref, 'refs/tags') || startsWith(github.event.inputs.tags, 'Deploy')
run: |
pdm plugin add pdm-publish
pdm publish --password ${{ secrets.PYPI_API_TOKEN }}