mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-27 19:57:02 +00:00
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.
34 lines
844 B
YAML
34 lines
844 B
YAML
name: Release @pybricks/jedi
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v3.*'
|
|
|
|
jobs:
|
|
publish_jedi:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- 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: '18.x'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- run: ./build.py "$VERSION"
|
|
working-directory: npm/jedi
|
|
- run: yarn publish
|
|
working-directory: npm/jedi/build
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|