Skip to content

Commit 20da8aa

Browse files
committed
Merge pull request #77 from CrystallizeAPI/feature-full-bun
feat: new crystallize cli
2 parents 38f228b + c857f58 commit 20da8aa

67 files changed

Lines changed: 3077 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
33
- package-ecosystem: "npm"
4-
directory: "/components/crystallize-cli"
4+
directory: "/components/cli"
55
schedule:
66
interval: "weekly"

.github/workflows/cli-ci.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Crystallize CLI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
9+
jobs:
10+
build-and-test:
11+
name: 🏗️ Build and Test
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: ⬇️ Checkout repo
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
fetch-tags: false
19+
20+
- name: ⎔ Setup bun
21+
uses: oven-sh/setup-bun@v2
22+
with:
23+
bun-version: latest
24+
25+
- name: 📥 Download deps
26+
working-directory: components/cli
27+
run: bun install --frozen-lockfile
28+
29+
- name: 🔍 Valid commit message
30+
working-directory: components/cli
31+
if: ${{ github.event_name == 'pull_request' }}
32+
run: bun commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
33+
34+
- name: 💄 Prettier
35+
working-directory: components/cli
36+
run: bun prettier --check .
37+
38+
- name: 📲 Test the builds
39+
working-directory: components/cli
40+
run: make build

.github/workflows/crystallize-cli-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Crystallize CLI
1+
name: Crystallize CLI (Legacy)
22

33
on:
44
push:

components/cli/.commitlintrc.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"header-max-length": [0, "never", 100],
5+
"body-max-line-length": [2, "always", 400],
6+
"type-enum": [
7+
2,
8+
"always",
9+
[
10+
"build",
11+
"chore",
12+
"ci",
13+
"docs",
14+
"feature",
15+
"feat",
16+
"fix",
17+
"perf",
18+
"refactor",
19+
"revert",
20+
"style",
21+
"test",
22+
"wip"
23+
]
24+
]
25+
}
26+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Thanks for your pull request! We love contributions.
2+
3+
However, this repository is what we call a "subtree split": a read-only copy of one directory of the main repository. It enables developers to depend on specific repository.
4+
5+
If you want to contribute, you should instead open a pull request on the main repository:
6+
7+
https://github.com/CrystallizeAPI/tools
8+
9+
Thank you for your contribution!
10+
11+
PS: if you haven't already, please add tests.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Thanks for reporting an issue! We love feedback.
2+
3+
However, this repository is what we call a "subtree split": a read-only copy of one directory of the main repository. It enables developers to depend on specific repository.
4+
5+
If you want to report or contribute, you should instead open your issue on the main repository:
6+
7+
https://github.com/CrystallizeAPI/tools
8+
9+
Thank you for your contribution!
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
issues:
3+
types: [opened, edited]
4+
5+
jobs:
6+
autoclose:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Close Issue
10+
uses: peter-evans/close-issue@v1
11+
with:
12+
comment: |
13+
Thanks for reporting an issue! We love feedback.
14+
15+
However, this repository is what we call a "subtree split": a read-only copy of one directory of the main repository. It enables developers to depend on specific repository.
16+
17+
If you want to report or contribute, you should instead open your issue on the main repository:
18+
19+
https://github.com/CrystallizeAPI/tools
20+
21+
Thank you for your contribution!
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
pull_request:
3+
types: [opened, edited, reopened]
4+
5+
jobs:
6+
autoclose:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Close Pull Request
10+
uses: peter-evans/close-pull@v1
11+
with:
12+
comment: |
13+
Thanks for your pull request! We love contributions.
14+
15+
However, this repository is what we call a "subtree split": a read-only copy of one directory of the main repository. It enables developers to depend on specific repository.
16+
17+
If you want to contribute, you should instead open a pull request on the main repository:
18+
19+
https://github.com/CrystallizeAPI/tools
20+
21+
Thank you for your contribution!
22+
23+
PS: if you haven't already, please add tests.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to Pages
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: 'pages'
15+
cancel-in-progress: false
16+
17+
jobs:
18+
deploy:
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: ⬇️ Checkout repo
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
fetch-tags: false
29+
30+
- name: 📦 Setup Pages
31+
uses: actions/configure-pages@v5
32+
33+
- name: 🦾 Upload artifact
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: 'docs/'
37+
38+
- name: 🚢 Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on:
2+
push:
3+
tags:
4+
- '*'
5+
6+
name: Release a New Version
7+
8+
jobs:
9+
releaseandpublish:
10+
name: Release on Github
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: ⬇️ Checkout repo
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
fetch-tags: false
18+
19+
- name: ⎔ Setup bun
20+
uses: oven-sh/setup-bun@v2
21+
with:
22+
bun-version: latest
23+
24+
- name: 📥 Download deps
25+
run: bun install --frozen-lockfile
26+
27+
- name: 🔨 Compiling the different versions
28+
run: make build-all
29+
30+
- name: 🏷 Create GitHub Release
31+
run: |
32+
TAG_NAME=${GITHUB_REF_NAME}
33+
TAG_MESSAGE=$(git tag -l --format='%(contents)' "$TAG_NAME")
34+
gh release create "${TAG_NAME}" --title "Release ${TAG_NAME}" --notes "${TAG_MESSAGE}"
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: 🚀 Upload Assets
39+
run: |
40+
ASSET_PLATFORMS=("bun-linux-x64" "bun-linux-arm64" "bun-windows-x64.exe" "bun-darwin-x64" "bun-darwin-arm64")
41+
for platform in "${ASSET_PLATFORMS[@]}"; do
42+
if [ -f "crystallize-$platform" ]; then
43+
gh release upload "${GITHUB_REF_NAME}" "crystallize-$platform" --clobber
44+
echo "✅ Uploaded file for platform $platform"
45+
else
46+
echo "❌ File for platform $platform not found, skipping."
47+
fi
48+
done
49+
env:
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)