mirror of
https://gh.wpcy.net/https://github.com/syntatis/kubrick.git
synced 2026-04-25 21:46:28 +08:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
NODE_VERSION: 22
|
|
|
|
jobs:
|
|
ci:
|
|
uses: ./.github/workflows/ci.yml
|
|
secrets:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
release-npm:
|
|
runs-on: ubuntu-latest
|
|
needs: ci
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Get Composer cache directory
|
|
id: composer-cache
|
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Setup Composer cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
key: php-7.4-composer-${{ hashFiles('**/composer.json') }}
|
|
restore-keys: php-7.4-composer-
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: 7.4
|
|
tools: composer:v2
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
cache: "npm"
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
npm ci --workspaces --no-audit --ignore-scripts
|
|
composer install --prefer-dist
|
|
|
|
- name: Run build
|
|
run: npm run build
|
|
|
|
- name: Publish to NPM
|
|
env:
|
|
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
run: npx lerna publish from-package --yes --pre-dist-tag next
|
|
|
|
publish-chromatic:
|
|
uses: ./.github/workflows/chromatic.yml
|
|
needs: release-npm
|
|
secrets:
|
|
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|