v3.0.0-beta.17 #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PyPI Publish | |
on: | |
# push: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build-tree-sitter-usfm3: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks out a copy of your repository on the ubuntu-latest machine | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup node and npm | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Run tests | |
run: | | |
cd tree-sitter-usfm3 | |
npm install --save nan | |
npm install --save-dev tree-sitter-cli | |
./node_modules/.bin/tree-sitter generate | |
./node_modules/.bin/tree-sitter test | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Build release distributions | |
run: | | |
cd tree-sitter-usfm3 | |
python -m pip install build setuptools | |
python -m build | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: tree-sitter-usfm3/dist/*.tar.gz | |
build-py-usfm-parser: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Build release distributions | |
run: | | |
cd py-usfm-parser | |
python -m pip install build setuptools | |
python -m build | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: py-usfm-parser/dist/*.tar.gz | |
publish_to_pypi: | |
needs: [build-tree-sitter-usfm3, build-py-usfm-parser] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: tree-sitter-usfm3/dist/ | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: py-usfm-parser/dist/ | |
- name: Publish tree-sitter-usfm3 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_token }} | |
# repository_url: https://test.pypi.org/legacy/ | |
packages_dir: tree-sitter-usfm3/dist/ | |
- name: Publish usfm-grammar 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_token }} | |
# repository_url: https://test.pypi.org/legacy/ | |
packages_dir: py-usfm-parser/dist/ | |