Skip to content

Revamp CI #344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 4, 2025
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
30 changes: 14 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@ on:

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build:
name: Build Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm run build
- run: pnpm run types
- run: pnpm run test
scripts:
if: github.repository_owner == 'bombshell-dev'
uses: bombshell-dev/automation/.github/workflows/run.yml@main
secrets: inherit
with:
commands: >
[
"build",
"types",
"test",
"deps"
]
15 changes: 0 additions & 15 deletions .github/workflows/issue-edited.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/issue-opened.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: issue

on:
issues:
types: [opened, edited, labeled, reopened]

jobs:
backlog:
if: github.event.action == 'edited' || github.event.action == 'labeled'
uses: bombshell-dev/automation/.github/workflows/move-issue-to-backlog.yml@main
secrets: inherit

project:
if: github.event.action == 'opened' || github.event.action == 'reopened'
uses: bombshell-dev/automation/.github/workflows/add-issue-to-project.yml@main
secrets: inherit
25 changes: 0 additions & 25 deletions .github/workflows/lint.yml

This file was deleted.

37 changes: 14 additions & 23 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
name: Preview
on: [push, pull_request]

jobs:
build:
if: github.repository == 'bombshell-dev/clack'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- run: pnpx pkg-pr-new publish './packages/*' --template './examples/*'
jobs:
preview:
if: github.repository_owner == 'bombshell-dev'
uses: bombshell-dev/automation/.github/workflows/preview.yml@main
secrets: inherit
with:
publish: "./packages/*"
template: "./examples/*"
17 changes: 17 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish

on:
push:
branches: [main, v0]
workflow_dispatch:

permissions:
contents: write
pull-requests: write
packages: write

jobs:
publish:
if: github.repository_owner == 'bombshell-dev'
uses: bombshell-dev/automation/.github/workflows/publish.yml@main
secrets: inherit
40 changes: 0 additions & 40 deletions .github/workflows/release.yml

This file was deleted.

9 changes: 1 addition & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,7 @@ Clack uses [Changesets](https://github.com/changesets/changesets) to manage vers

2. **For maintainers**:
- Merging PRs with changesets will queue them for the next release
- When ready to release:
```bash
# Update versions based on changesets
pnpm ci:version

# Publish to npm
pnpm ci:publish
```
- When ready to release, merge the `[ci] release` PR

### Backporting to v0 Branch

Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
"types": "biome lint --write --unsafe",
"deps": "pnpm exec knip --production",
"test": "pnpm --color -r run test",
"ci:install": "pnpm install --no-frozen-lockfile",
"ci:version": "changeset version",
"ci:publish": "changeset publish",
"ci:prepublish": "pnpm build"
"pretest": "pnpm run build"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
Expand Down