Skip to content

Commit 614453a

Browse files
committed
.github/workflows: Fix permissions and npm version tags.
1 parent 0f6b8de commit 614453a

7 files changed

Lines changed: 45 additions & 14 deletions

File tree

.github/workflows/publish-ide-docs.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@ on:
55
tags:
66
- 'v4.*'
77

8+
permissions:
9+
id-token: write
10+
contents: read
11+
812
jobs:
913
publish_ide_docs:
1014
runs-on: ubuntu-22.04
11-
permissions:
12-
id-token: write
1315
steps:
1416
- name: Get version from tag
1517
run: |
1618
VERSION="${GITHUB_REF_NAME#v}"
1719
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/')
1820
echo "VERSION=$VERSION" >> $GITHUB_ENV
1921
echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
22+
echo "NPM_TAG=$(echo "$NPM_VERSION" | grep -q '-' && echo 'next' || echo 'latest')" >> $GITHUB_ENV
2023
- name: Ubuntu packages
2124
run: |
2225
sudo apt-get update
@@ -34,13 +37,13 @@ jobs:
3437
poetry run python -m pip install --upgrade pip
3538
poetry run python -m pip install --upgrade setuptools
3639
poetry install --only=doc
37-
- uses: actions/setup-node@v6
40+
- uses: actions/setup-node@v4
3841
with:
39-
node-version: '22.x'
42+
node-version: '24'
4043
registry-url: 'https://registry.npmjs.org'
4144
- run: npm version --no-git-tag-version "$NPM_VERSION"
4245
working-directory: npm/ide-docs
4346
- run: yarn build
4447
working-directory: npm/ide-docs
45-
- run: npm publish
48+
- run: npm publish --tag "$NPM_TAG"
4649
working-directory: npm/ide-docs

.github/workflows/publish-jedi.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ on:
55
tags:
66
- 'v4.*'
77

8+
permissions:
9+
id-token: write
10+
contents: read
11+
812
jobs:
913
publish_jedi:
1014
runs-on: ubuntu-22.04
11-
permissions:
12-
id-token: write
1315
steps:
1416
- uses: actions/checkout@v6
1517
- name: Get version from tag
@@ -18,6 +20,7 @@ jobs:
1820
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/')
1921
echo "VERSION=$VERSION" >> $GITHUB_ENV
2022
echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
23+
echo "NPM_TAG=$(echo "$NPM_VERSION" | grep -q '-' && echo 'next' || echo 'latest')" >> $GITHUB_ENV
2124
- name: Set up Python
2225
uses: actions/setup-python@v5
2326
with:
@@ -27,11 +30,11 @@ jobs:
2730
- name: Set pybricks-jedi version
2831
run: poetry version "$VERSION"
2932
working-directory: jedi
30-
- uses: actions/setup-node@v6
33+
- uses: actions/setup-node@v4
3134
with:
32-
node-version: '22.x'
35+
node-version: '24'
3336
registry-url: 'https://registry.npmjs.org'
3437
- run: ./build.py "$NPM_VERSION"
3538
working-directory: npm/jedi
36-
- run: npm publish
39+
- run: npm publish --tag "$NPM_TAG"
3740
working-directory: npm/jedi/build

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@
44

55
## Unreleased
66

7+
## 4.0.0b4 - 2026-05-29
8+
9+
### Changed
10+
11+
- Tag npm prereleases.
12+
13+
## 4.0.0b4 - 2026-05-29
14+
15+
### Changed
16+
17+
- Bump node version.
18+
19+
## 4.0.0b3 - 2026-05-29
20+
21+
### Changed
22+
23+
- Fixed NPM publishing permissions.
24+
25+
## 4.0.0b2 - 2026-05-29
26+
27+
### Changed
28+
29+
- Change NPM publishing to trusted publishers.
30+
31+
732
## 4.0.0b1 - 2026-05-29
833

934
### Changed

npm/ide-docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Special build of Pybricks API docs for embedding in an IDE.",
55
"repository": {
66
"type": "git",
7-
"url": "https://github.com/pybricks/pybricks-api",
7+
"url": "git+https://github.com/pybricks/pybricks-api.git",
88
"directory": "npm/ide-docs"
99
},
1010
"publishConfig": {

npm/images/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"license": "MIT",
1919
"repository": {
2020
"type": "git",
21-
"url": "https://github.com/pybricks/pybricks-api",
21+
"url": "git+https://github.com/pybricks/pybricks-api.git",
2222
"directory": "npm/images",
2323
},
2424
"publishConfig": {"registry": "https://registry.npmjs.org", "access": "public"},

npm/jedi/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"description": "Binary distribution of pybricks-jedi Python package and dependencies for use with Pyodide.",
2525
"repository": {
2626
"type": "git",
27-
"url": "https://github.com/pybricks/pybricks-api",
27+
"url": "git+https://github.com/pybricks/pybricks-api.git",
2828
"directory": "npm/jedi",
2929
},
3030
"publishConfig": {"registry": "https://registry.npmjs.org", "access": "public"},

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pybricks"
3-
version = "4.0.0b1"
3+
version = "4.0.0b5"
44
description = "Documentation and user-API stubs for Pybricks MicroPython"
55
authors = ["The Pybricks Authors <team@pybricks.com>"]
66
maintainers = ["Laurens Valk <laurens@pybricks.com>", "David Lechner <david@pybricks.com>" ]

0 commit comments

Comments
 (0)