mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-28 04:07:46 +00:00
.github/workflows: Fix permissions and npm version tags.
This commit is contained in:
@@ -5,11 +5,13 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- 'v4.*'
|
- 'v4.*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish_ide_docs:
|
publish_ide_docs:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get version from tag
|
- name: Get version from tag
|
||||||
run: |
|
run: |
|
||||||
@@ -17,6 +19,7 @@ jobs:
|
|||||||
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/')
|
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 "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
echo "NPM_VERSION=$NPM_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
|
- name: Ubuntu packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@@ -34,13 +37,13 @@ jobs:
|
|||||||
poetry run python -m pip install --upgrade pip
|
poetry run python -m pip install --upgrade pip
|
||||||
poetry run python -m pip install --upgrade setuptools
|
poetry run python -m pip install --upgrade setuptools
|
||||||
poetry install --only=doc
|
poetry install --only=doc
|
||||||
- uses: actions/setup-node@v6
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '22.x'
|
node-version: '24'
|
||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: 'https://registry.npmjs.org'
|
||||||
- run: npm version --no-git-tag-version "$NPM_VERSION"
|
- run: npm version --no-git-tag-version "$NPM_VERSION"
|
||||||
working-directory: npm/ide-docs
|
working-directory: npm/ide-docs
|
||||||
- run: yarn build
|
- run: yarn build
|
||||||
working-directory: npm/ide-docs
|
working-directory: npm/ide-docs
|
||||||
- run: npm publish
|
- run: npm publish --tag "$NPM_TAG"
|
||||||
working-directory: npm/ide-docs
|
working-directory: npm/ide-docs
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- 'v4.*'
|
- 'v4.*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish_jedi:
|
publish_jedi:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- name: Get version from tag
|
- name: Get version from tag
|
||||||
@@ -18,6 +20,7 @@ jobs:
|
|||||||
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/')
|
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 "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
echo "NPM_VERSION=$NPM_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
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
@@ -27,11 +30,11 @@ jobs:
|
|||||||
- name: Set pybricks-jedi version
|
- name: Set pybricks-jedi version
|
||||||
run: poetry version "$VERSION"
|
run: poetry version "$VERSION"
|
||||||
working-directory: jedi
|
working-directory: jedi
|
||||||
- uses: actions/setup-node@v6
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '22.x'
|
node-version: '24'
|
||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: 'https://registry.npmjs.org'
|
||||||
- run: ./build.py "$NPM_VERSION"
|
- run: ./build.py "$NPM_VERSION"
|
||||||
working-directory: npm/jedi
|
working-directory: npm/jedi
|
||||||
- run: npm publish
|
- run: npm publish --tag "$NPM_TAG"
|
||||||
working-directory: npm/jedi/build
|
working-directory: npm/jedi/build
|
||||||
|
|||||||
@@ -4,6 +4,31 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## 4.0.0b4 - 2026-05-29
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Tag npm prereleases.
|
||||||
|
|
||||||
|
## 4.0.0b4 - 2026-05-29
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Bump node version.
|
||||||
|
|
||||||
|
## 4.0.0b3 - 2026-05-29
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Fixed NPM publishing permissions.
|
||||||
|
|
||||||
|
## 4.0.0b2 - 2026-05-29
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Change NPM publishing to trusted publishers.
|
||||||
|
|
||||||
|
|
||||||
## 4.0.0b1 - 2026-05-29
|
## 4.0.0b1 - 2026-05-29
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"description": "Special build of Pybricks API docs for embedding in an IDE.",
|
"description": "Special build of Pybricks API docs for embedding in an IDE.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pybricks/pybricks-api",
|
"url": "git+https://github.com/pybricks/pybricks-api.git",
|
||||||
"directory": "npm/ide-docs"
|
"directory": "npm/ide-docs"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ package_json = {
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pybricks/pybricks-api",
|
"url": "git+https://github.com/pybricks/pybricks-api.git",
|
||||||
"directory": "npm/images",
|
"directory": "npm/images",
|
||||||
},
|
},
|
||||||
"publishConfig": {"registry": "https://registry.npmjs.org", "access": "public"},
|
"publishConfig": {"registry": "https://registry.npmjs.org", "access": "public"},
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ package_json = {
|
|||||||
"description": "Binary distribution of pybricks-jedi Python package and dependencies for use with Pyodide.",
|
"description": "Binary distribution of pybricks-jedi Python package and dependencies for use with Pyodide.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pybricks/pybricks-api",
|
"url": "git+https://github.com/pybricks/pybricks-api.git",
|
||||||
"directory": "npm/jedi",
|
"directory": "npm/jedi",
|
||||||
},
|
},
|
||||||
"publishConfig": {"registry": "https://registry.npmjs.org", "access": "public"},
|
"publishConfig": {"registry": "https://registry.npmjs.org", "access": "public"},
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "pybricks"
|
name = "pybricks"
|
||||||
version = "4.0.0b1"
|
version = "4.0.0b5"
|
||||||
description = "Documentation and user-API stubs for Pybricks MicroPython"
|
description = "Documentation and user-API stubs for Pybricks MicroPython"
|
||||||
authors = ["The Pybricks Authors <team@pybricks.com>"]
|
authors = ["The Pybricks Authors <team@pybricks.com>"]
|
||||||
maintainers = ["Laurens Valk <laurens@pybricks.com>", "David Lechner <david@pybricks.com>" ]
|
maintainers = ["Laurens Valk <laurens@pybricks.com>", "David Lechner <david@pybricks.com>" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user