Skip to content

v0.0.17

v0.0.17 #33

Workflow file for this run

name: Upload a new version to the PYPI
on:
release:
types: [created]
jobs:
check-and-publish-python:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.11"]
defaults:
run:
working-directory: ./python
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip build wheel twine
python3 -m pip install -r requirements.txt
- name: Install module
run: |
python3 -m pip install .
- name: Test with coverage and pytest
run: |
python3 -m pytest tests/
- name: Generate distribution archives
run: |
python3 -m build
- name: Upload the distribution archives
run: |
python3 -m twine upload --verbose dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
check-and-publish-javascript:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
node-version: [20]
defaults:
run:
working-directory: ./javascript
steps:
- uses: actions/checkout@v1
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Set correct version
run: |
[ "$GITHUB_REF_TYPE" = "tag" ] || exit 2
[ "${GITHUB_REF_NAME:0:1}" = v ] || exit 3
npm version $GITHUB_REF_NAME
- name: Install dependencies
run: |
npm install --include=dev
- name: Lint with eslint and test with mocha
run: |
npm run lint
npm run test
- name: Publish new version
run: |
npm run build
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}