mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 09:05:07 +00:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Release @pybricks/ide-docs
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v4.*'
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
|
|
jobs:
|
|
publish_ide_docs:
|
|
runs-on: ubuntu-24.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
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
- name: Install dependencies
|
|
run: |
|
|
pipx install poetry
|
|
poetry install --only=doc
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
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: npm publish --tag "$NPM_TAG"
|
|
working-directory: npm/ide-docs
|