Skip to content
Merged
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 .changeset/pink-owls-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@embedly/platforms": patch
"@embedly/builder": patch
"@embedly/logging": patch
"@embedly/config": patch
"@embedly/parser": patch
"@embedly/types": patch
"@embedly/api": patch
"@embedly/bot": patch
---

feat(ci): split github actions across multiple files
51 changes: 8 additions & 43 deletions .github/workflows/ci.yml → .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,48 @@
name: CI
name: Changesets

env:
PNPM_VERSION: "10.15.1"
NODE_VERSION: "24"

on:
push:
branches: [main]
pull_request:
branches: [main]

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint and format check
run: pnpm biome ci
- name: Build all packages
run: pnpm build
release:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Get Release Version
id: versioning
run: |
if pnpm changeset status --output release.json; then
echo "VERSION=$(jq -r '.releases.[0].newVersion' release.json)" >> $GITHUB_OUTPUT
rm release.json
fi

- name: Create Release Pull Request or Publish
id: changesets
- name: Create Release Pull Request
uses: changesets/action@v1
with:
publish: pnpm changeset publish
title: '🔖 chore(release): v${{ steps.versioning.outputs.VERSION }}'
commit: '🔖 chore(release): v${{ steps.versioning.outputs.VERSION }}'
title: '🔖 chore(release): v${{ steps.versioning.outputs.VERSION }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/tag-releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Tag Release

on:
pull_request:
types: [closed]
branches: [main]

jobs:
tag:
if: |
github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.title, '🔖 chore(release):')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: Get version from package.json
id: version
run: |
VERSION=$(jq -r '.version' apps/bot/package.json)
echo "VERSION=v$VERSION" >> $GITHUB_OUTPUT
echo "Creating tag: v$VERSION"

- name: Check if tag exists
id: check_tag
run: |
if git rev-parse "${{ steps.version.outputs.VERSION }}" >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi

- name: Create and push tag
if: steps.check_tag.outputs.exists == 'false'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a ${{ steps.version.outputs.VERSION }} -m "Release ${{ steps.version.outputs.VERSION }}"
git push origin ${{ steps.version.outputs.VERSION }}

- name: Tag already exists
if: steps.check_tag.outputs.exists == 'true'
run: echo "Tag ${{ steps.version.outputs.VERSION }} already exists, skipping"
41 changes: 41 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Validate (Lint and Build)
env:
PNPM_VERSION: "10.15.1"
NODE_VERSION: "24"

on:
push:
branches: ['**']
pull_request:
branches: [main, devel]

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

jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint and format check
run: pnpm biome ci
- name: Build all packages
run: pnpm build