Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies
Expand Down
17 changes: 1 addition & 16 deletions .github/workflows/jedi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,9 @@ jobs:
if: github.ref_type != 'tag'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- run: pipx install poetry
- run: poetry install
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 }}
29 changes: 20 additions & 9 deletions .github/workflows/publish-ide-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,33 @@ name: Release @pybricks/ide-docs

on:
push:
tags:
- '@pybricks/ide-docs/**'
tags:
- 'v4.*'

permissions:
id-token: write
contents: read

jobs:
publish_ide_docs:
runs-on: ubuntu-22.04
steps:
- name: Get version from tag
run: |
VERSION="${GITHUB_REF_NAME#v}"
NPM_VERSION=$(echo "$VERSION" | sed 's/\([0-9]\)a\([0-9]\)/\1-alpha.\2/;s/\([0-9]\)b\([0-9]\)/\1-beta.\2/;s/\([0-9]\)rc\([0-9]\)/\1-rc.\2/')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
echo "NPM_TAG=$(echo "$NPM_VERSION" | grep -q '-' && echo 'next' || echo 'latest')" >> $GITHUB_ENV
- name: Ubuntu packages
run: |
sudo apt-get update
sudo apt-get install -y dvisvgm preview-latex-style texlive texlive-fonts-extra texlive-latex-extra
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
Expand All @@ -26,13 +37,13 @@ jobs:
poetry run python -m pip install --upgrade pip
poetry run python -m pip install --upgrade setuptools
poetry install --only=doc
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '14.x'
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: npm version --no-git-tag-version "$NPM_VERSION"
working-directory: npm/ide-docs
- run: yarn build
working-directory: npm/ide-docs
- run: yarn publish
- run: npm publish --tag "$NPM_TAG"
working-directory: npm/ide-docs
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/publish-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
publish_ide_docs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- run: ./build.py
working-directory: npm/images
Expand Down
44 changes: 32 additions & 12 deletions .github/workflows/publish-jedi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,42 @@ name: Release @pybricks/jedi

on:
push:
tags:
- '@pybricks/jedi/**'
tags:
- 'v4.*'

permissions:
id-token: write
contents: read

jobs:
publish_jedi:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- uses: actions/checkout@v6
- name: Get version from tag
run: |
VERSION="${GITHUB_REF_NAME#v}"
NPM_VERSION=$(echo "$VERSION" | sed 's/\([0-9]\)a\([0-9]\)/\1-alpha.\2/;s/\([0-9]\)b\([0-9]\)/\1-beta.\2/;s/\([0-9]\)rc\([0-9]\)/\1-rc.\2/')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
echo "NPM_TAG=$(echo "$NPM_VERSION" | grep -q '-' && echo 'next' || echo 'latest')" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install poetry
run: pipx install poetry
- name: Set pybricks-jedi version
run: poetry version "$VERSION"
working-directory: jedi
- name: Set pybricks version and update jedi dependency pin
run: |
poetry version "$VERSION"
sed -i "s/^pybricks = \".*\"/pybricks = \"$VERSION\"/" jedi/pyproject.toml
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: ./build.py
working-directory: npm/jedi
- run: yarn publish
working-directory: npm/jedi/build
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- run: python jedi/build.py "$NPM_VERSION"
- run: npm publish --tag "$NPM_TAG"
working-directory: jedi/npm-build
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
tags:
- 'v3.*'
- 'v4.*'

name: Create release on GitHub and PyPI

Expand All @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
Expand All @@ -38,7 +38,7 @@ jobs:
build_and_publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- run: pipx run poetry build
- run: pipx run poetry publish
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
build/
build-*/
_build/
npm-build/

# Tests
######################
Expand Down
Loading