Skip to content

v0.1.2

v0.1.2 #7

Workflow file for this run

name: Package
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Prepare Python environment
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
# Prepare Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: https://registry.npmjs.org/
# Build
- name: Build yitizi.json
run: python build/main.py
# Package for Python
- name: Build for Python
run: |
cp LICENSE README.md python
cp yitizi.json python/src/yitizi
- name: Publish for Python
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
cd python
python setup.py sdist bdist_wheel
twine upload dist/*
# Package for Node.js
- name: Build for Node.js
run: |
cp LICENSE README.md javascript
build/javascript.sh
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd javascript
npm publish