Skip to content

Release packages

Release packages #19

Workflow file for this run

name: Release packages (Work in Progress, a dry run only)
on:
workflow_dispatch:
inputs:
workspaces:
description: A comma-separated list of workspaces to release
required: false
type: string
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
lint_and_unit_tests:
name: Run lint and unit tests
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Build local packages
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run build
- name: Lint
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run lint
- name: Unit tests
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run test-unit
cypress_tests:
name: Run cypress tests
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Build local packages
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run build
- name: Cypress tests
run: yarn workspaces foreach --all --parallel --topological-dev --exclude @elastic/eui-website --exclude @elastic/eui-monorepo --exclude @elastic/eui-docgen run test-cypress
release:
name: Release
runs-on: ubuntu-latest
# needs: [lint_and_unit_tests, cypress_tests]
steps:
- uses: actions/checkout@v4
with:
# This is needed for yarn version to work properly, but it increases fetch time.
# We can change this back to "1" if we replace yarn version with something else
fetch-depth: 0
- name: Configure git
run: |
git config --global user.name 'EUI Machine'
git config --global user.email '[email protected]'
- uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: yarn
registry-url: 'https://registry.npmjs.org'
- name: Install latest npm for publishing and signing the package
run: npm install -g npm@latest
- name: Install dependencies
run: yarn install --immutable
- name: Build release scripts
run: yarn workspace @elastic/eui-release-cli run build
- name: Rename git remote to upstream
run: git remote rename origin upstream
- name: Build packages and release
run: yarn release run snapshot --workspaces @elastic/eslint-plugin-eui --skip-prompts --skip-auth-check --use-auth-token