/
githubmirror
/
strapi
Обзор
Документация
Войти
/
githubmirror
/
strapi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
.github/workflows/publish-npm.yml
72 строки
2 KB
Nico André
chore(.github): bump CI runners to node 24 (#26231)
11 май 2026, 12:34
Не верифицирован
11 май 2026, 12:34
4c7cd56
Код
Авторство
О чём код?
name: 'Publish to npm' on: workflow_dispatch: inputs: version: type: choice description: 'The version you want to publish to NPM' options: - patch - minor - prepatch - preminor tag: type: choice description: 'NPM dist-tag' default: 'experimental' options: - latest - beta - rc - alpha - experimental permissions: contents: write id-token: write jobs: publish: name: Publish packages runs-on: ubuntu-latest environment: production steps: - name: Checkout uses: actions/checkout@v6 with: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: ${{ (inputs.tag == 'experimental') && 1 || 0 }} - name: Setup Node uses: actions/setup-node@v6 with: node-version: '24' - run: yarn - name: Publish packages (run publish scripts) env: TAG: ${{ inputs.tag }} VERSION: ${{ inputs.version }} REGISTRY: https://registry.npmjs.org/ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_ACTOR: ${{ github.actor }} GITHUB_SHA: ${{ github.sha }} run: | set -euo pipefail echo "Publish flow: $TYPE" # Ensure registry is set npm config set registry "$REGISTRY" DIST_TAG="$TAG" # Decide flow based on DIST_TAG: experimental => prerelease, otherwise release if [ "$DIST_TAG" = "experimental" ]; then echo "Running prerelease flow (DIST_TAG=experimental): ./scripts/pre-publish.sh" export VERSION='0.0.0-experimental.${{ github.sha }}' export DIST_TAG ./scripts/pre-publish.sh else echo "Running release flow: ./scripts/publish.sh (DIST_TAG=$DIST_TAG)" fi