diff --git a/.github/workflows/ghp-deploy.yml b/.github/workflows/ghp-deploy.yml new file mode 100644 index 0000000..62d4d8b --- /dev/null +++ b/.github/workflows/ghp-deploy.yml @@ -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 diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml new file mode 100644 index 0000000..a42399d --- /dev/null +++ b/.github/workflows/pypi-release.yml @@ -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/* diff --git a/package.json b/package.json index c5ba7a9..2d14857 100644 --- a/package.json +++ b/package.json @@ -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" } }