Skip to content

add workflows for publish and build #1

add workflows for publish and build

add workflows for publish and build #1

Workflow file for this run

name: CI
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# This step only runs yarn install to make sure that an exact match is available
# in the cache. The two following verify and tests jobs then always install from cache.
install:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18.x]
env:
CI: true
NODE_OPTIONS: --max-old-space-size=4096
name: Install ${{ matrix.node-version }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- uses: actions/checkout@v4.1.1
- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.6.5
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
# The verify jobs runs all the verification that doesn't require a
# diff towards master, since it takes some time to fetch that.
verify:
runs-on: ubuntu-latest
needs: install
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x]
env:
CI: true
NODE_OPTIONS: --max-old-space-size=4096
name: Verify ${{ matrix.node-version }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit
- uses: actions/checkout@v4.1.1
- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.6.5
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
- run: yarn run prettier:check
- run: yarn run entity:build
- run: yarn test