Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/actions/check-code/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "check-code"
description: "run linting and type checking"

runs:
using: "composite"
steps:
- run: npm run lint
shell: bash
- run: npm run types
shell: bash
- run: npm run typecheck
shell: bash
17 changes: 0 additions & 17 deletions .github/actions/code-checks/action.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/actions/install-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "install-node"
description: "setup node environment and install dependencies"

runs:
using: "composite"
steps:
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
- run: npm ci
shell: bash
21 changes: 21 additions & 0 deletions .github/workflows/pre-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pre-run

on:
workflow_call:
outputs:
is-not-fork:
description: "is the repository the original project"
value: ${{ jobs.check-fork.outputs.is_not_fork }}
workflow_dispatch:

permissions:
contents: read

jobs:
check-fork:
runs-on: ubuntu-latest
outputs:
is_not_fork: ${{ steps.check.outputs.is_not_fork }}
steps:
- id: check
run: echo "is_not_fork=${{ github.repository_owner == 'stx-labs' }}" >> "$GITHUB_OUTPUT"
16 changes: 7 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Publish
name: publish

on:
push:
branches:
Expand All @@ -8,18 +9,15 @@ on:
permissions:
id-token: write # Required for OIDC
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
publish_npm:
name: Publish production NPM packages
publish-npm:
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'chore: version packages')"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
- run: npm ci
- uses: ./.github/actions/install-node
- run: npx lerna publish from-package --yes
29 changes: 29 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: pull-request

on:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
pre-run:
uses: ./.github/workflows/pre-run.yml

commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # 6.2.1

code-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-node
- uses: ./.github/actions/check-code
96 changes: 0 additions & 96 deletions .github/workflows/pull_request.yml

This file was deleted.

49 changes: 23 additions & 26 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Version
name: version

on:
push:
branches:
Expand All @@ -9,34 +10,30 @@ permissions:
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
code_checks:
name: Code checks
code-checks:
if: "!contains(github.event.head_commit.message, 'chore: version packages')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
- uses: ./.github/actions/code-checks
- uses: ./.github/actions/install-node
- uses: ./.github/actions/check-code

version:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'chore: version packages')"
needs: [code_checks]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
- run: npm ci
- uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba
with:
title: "chore: version packages"
commit: "chore: version packages"
commitMode: "github-api"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TODO: RE-ENABLE VERSION WHEN PERMISSIONS ARE FIXED
# version:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, 'chore: version packages')"
# needs: [code-checks]
# steps:
# - uses: actions/checkout@v4
# - uses: ./.github/actions/install-node
# - uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba
# with:
# title: "chore: version packages"
# commit: "chore: version packages"
# commitMode: "github-api"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}