add GHAs for GHP deploy, PyPI release

This commit is contained in:
Ryan Williams 2023-08-26 22:05:32 -04:00
commit e7f3497c51
3 changed files with 46 additions and 1 deletions

18
.github/workflows/ghp-deploy.yml vendored Normal file
View file

@ -0,0 +1,18 @@
name: Deploy demo to GitHub Pages
on:
push:
branches: [ main ]
jobs:
deploy:
name: Deploy demo to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npm test -- --watchAll=false
- run: npm run build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: ghp
folder: build

26
.github/workflows/pypi-release.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: Test Python, release to PyPI
on:
push:
branches: [ "main" ]
tags: [ "*.*" ]
pull_request:
branches: [ "**" ]
jobs:
release:
name: Test Python, release to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11
- run: pip install -e .[test] setuptools twine wheel
- run: pytest
- name: Release
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

View file

@ -21,6 +21,7 @@
"not op_mini all"
],
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"canvas": "^2.11.2"
}
}