Skip to content

Commit 99831e9

Browse files
authored
Revamp CI (#344)
1 parent 17d3650 commit 99831e9

File tree

10 files changed

+63
-146
lines changed

10 files changed

+63
-146
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,19 @@ on:
88

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

1414
jobs:
15-
build:
16-
name: Build Packages
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v4
20-
- uses: pnpm/action-setup@v4
21-
- uses: actions/setup-node@v4
22-
with:
23-
node-version: 20
24-
cache: "pnpm"
25-
- run: pnpm install
26-
- run: pnpm run build
27-
- run: pnpm run types
28-
- run: pnpm run test
15+
scripts:
16+
if: github.repository_owner == 'bombshell-dev'
17+
uses: bombshell-dev/automation/.github/workflows/run.yml@main
18+
secrets: inherit
19+
with:
20+
commands: >
21+
[
22+
"build",
23+
"types",
24+
"test",
25+
"deps"
26+
]

.github/workflows/issue-edited.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/issue-opened.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/issue.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: issue
2+
3+
on:
4+
issues:
5+
types: [opened, edited, labeled, reopened]
6+
7+
jobs:
8+
backlog:
9+
if: github.event.action == 'edited' || github.event.action == 'labeled'
10+
uses: bombshell-dev/automation/.github/workflows/move-issue-to-backlog.yml@main
11+
secrets: inherit
12+
13+
project:
14+
if: github.event.action == 'opened' || github.event.action == 'reopened'
15+
uses: bombshell-dev/automation/.github/workflows/add-issue-to-project.yml@main
16+
secrets: inherit

.github/workflows/lint.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/preview.yml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
name: Preview
2-
on: [push, pull_request]
32

4-
jobs:
5-
build:
6-
if: github.repository == 'bombshell-dev/clack'
7-
runs-on: ubuntu-latest
8-
9-
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v4
12-
13-
- name: Install pnpm
14-
uses: pnpm/action-setup@v4
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
159

16-
- name: Setup Node
17-
uses: actions/setup-node@v4
18-
with:
19-
node-version: 20
20-
registry-url: https://registry.npmjs.org/
21-
cache: "pnpm"
22-
23-
- name: Install dependencies
24-
run: pnpm install
25-
26-
- run: pnpx pkg-pr-new publish './packages/*' --template './examples/*'
10+
jobs:
11+
preview:
12+
if: github.repository_owner == 'bombshell-dev'
13+
uses: bombshell-dev/automation/.github/workflows/preview.yml@main
14+
secrets: inherit
15+
with:
16+
publish: "./packages/*"
17+
template: "./examples/*"

.github/workflows/publish.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches: [main, v0]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
packages: write
12+
13+
jobs:
14+
publish:
15+
if: github.repository_owner == 'bombshell-dev'
16+
uses: bombshell-dev/automation/.github/workflows/publish.yml@main
17+
secrets: inherit

.github/workflows/release.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,7 @@ Clack uses [Changesets](https://github.com/changesets/changesets) to manage vers
283283

284284
2. **For maintainers**:
285285
- Merging PRs with changesets will queue them for the next release
286-
- When ready to release:
287-
```bash
288-
# Update versions based on changesets
289-
pnpm ci:version
290-
291-
# Publish to npm
292-
pnpm ci:publish
293-
```
286+
- When ready to release, merge the `[ci] release` PR
294287

295288
### Backporting to v0 Branch
296289

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
"types": "biome lint --write --unsafe",
1313
"deps": "pnpm exec knip --production",
1414
"test": "pnpm --color -r run test",
15-
"ci:install": "pnpm install --no-frozen-lockfile",
16-
"ci:version": "changeset version",
17-
"ci:publish": "changeset publish",
18-
"ci:prepublish": "pnpm build"
15+
"pretest": "pnpm run build"
1916
},
2017
"devDependencies": {
2118
"@biomejs/biome": "1.9.4",

0 commit comments

Comments
 (0)