Skip to content

01 - Publish

01 - Publish #424

Workflow file for this run

name: 01 - Publish
env:
access: public
registry: https://registry.npmjs.org
token: ${{ secrets.NPMJS_GRANULAR_TOKEN }}
prefix: v1
on:
workflow_dispatch:
inputs:
tag:
type: choice
description: Which NPM tag should be assigned?
options:
- next
- latest
jobs:
publish:
if: github.repository == 'public-ui/kolibri'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: '${{env.registry}}'
scope: '@public-ui'
- name: Install pnpm
uses: pnpm/action-setup@v3
id: pnpm-install
with:
version: 8
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store
restore-keys: |
${{ runner.os }}-pnpm-store
- name: Install
run: pnpm i --no-frozen-lockfile --no-verify-store-integrity
- name: Build
run: pnpm -r build
- name: Build and publish schema
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/schema
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish components
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/components
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v11
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v11
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v12
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v12
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v13
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v13
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v14
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v14
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v15
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v15
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v16
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v16
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter angular v17
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/angular/v17
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter react
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/react
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter react-standalone
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/react-standalone
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter solid
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/solid
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter vue
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/vue
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter preact
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/preact
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish adapter hydrate
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/adapters/hydrate
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish create-kolibri
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/create-kolibri
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish tools kolibri-cli
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/tools/kolibri-cli
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish theme default
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/themes/default
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish themes
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/themes
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish sample react
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/samples/react
env:
NODE_AUTH_TOKEN: ${{env.token}}
- name: Build and publish tools visual-tests
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/tools/visual-tests
env:
NODE_AUTH_TOKEN: ${{env.token}}
# deprecated packages
- name: Build and publish core
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/core
env:
NODE_AUTH_TOKEN: ${{env.token}}
# packages a obsolete with next major release
- name: Build and publish create-kolibri
continue-on-error: true
run: pnpm publish --access ${{env.access}} --no-git-checks --tag ${{env.prefix}}-${{github.event.inputs.tag}}
working-directory: packages/create-kolibri
env:
NODE_AUTH_TOKEN: ${{env.token}}
publish-page:
needs: publish
uses: public-ui/kolibri/.github/workflows/publish-page.yml@release/1.7