npm: Simplify release pipeline.

Releasing API updates is quite a long and error prone process, so the point that it was limiting our ability to push frequent updates in practice. There were 5 tag, commit, wait, and proceed steps and you'd have to start over or force push if a mistake was made.

This keeps all the npm packages as they were, but versions everything from a single source of truth, which is this project's main version. Everything builds on a tag on the main repo, much like we did for a regular IDE docs RTD release.

It also skips the PyPI for jedi as an intermediate step, which isn't really needed and required us to have this strict order of publication steps.
This commit is contained in:
Laurens Valk
2026-05-29 20:38:37 +02:00
parent a9be86238d
commit 95b168355e
12 changed files with 97 additions and 255 deletions
-15
View File
@@ -13,18 +13,3 @@ jobs:
working-directory: ./jedi
- run: poetry run pytest -vv
working-directory: ./jedi
publish:
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'pybricks_jedi/')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: pipx install poetry
- run: poetry install
working-directory: ./jedi
- run: poetry build
working-directory: ./jedi
- run: poetry publish
working-directory: ./jedi
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PYBRICKS_JEDI_TOKEN }}
+7 -3
View File
@@ -2,13 +2,15 @@ name: Release @pybricks/ide-docs
on:
push:
tags:
- '@pybricks/ide-docs/**'
tags:
- 'v3.*'
jobs:
publish_ide_docs:
runs-on: ubuntu-22.04
steps:
- name: Get version from tag
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Ubuntu packages
run: |
sudo apt-get update
@@ -28,8 +30,10 @@ jobs:
poetry install --only=doc
- uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm version --no-git-tag-version "$VERSION"
working-directory: npm/ide-docs
- run: yarn build
working-directory: npm/ide-docs
- run: yarn publish
+15 -5
View File
@@ -2,20 +2,30 @@ name: Release @pybricks/jedi
on:
push:
tags:
- '@pybricks/jedi/**'
tags:
- 'v3.*'
jobs:
publish_jedi:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- name: Get version from tag
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install poetry
run: pipx install poetry
- name: Set pybricks-jedi version
run: poetry version "$VERSION"
working-directory: jedi
- uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: ./build.py
- run: ./build.py "$VERSION"
working-directory: npm/jedi
- run: yarn publish
working-directory: npm/jedi/build