Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .commitlintrc.json

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/build.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Pre-Release

on:
workflow_dispatch:
inputs:
override_version:
description: "Override the version to use for the pre-release"
type: string
required: false
default: ""

jobs:
pre-release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install Knope
uses: knope-dev/action@v2.1.0
with:
version: 0.21.0

- name: Install dependencies
run: bun ci

- name: Set up Git user
run: |
git config user.name "knope-bot"
git config user.email "knope-bot@users.noreply.github.com"

- name: Run Knope Pre-Release
run: knope pre-release ${{ inputs.override_version != '' && format('--override-version={0}', inputs.override_version) || '' }}
env:
GH_TOKEN: ${{ secrets.CI_WORKER_PAT }}
29 changes: 0 additions & 29 deletions .github/workflows/publish.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/quality-assurance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Quality Assurance

on:
push:

jobs:
static-test:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

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

- name: TypeScript Compiler
run: bun run compile

- name: Biome Lint + Format
run: bun run check

- name: Assuring build is working
run: bun run build

- name: Validate current commit (last commit)
if: github.event_name == 'push'
run: bun commitlint --last --verbose

unit-test:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

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

- name: Unit Test Suite
run: bun test
95 changes: 95 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Release

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

env:
ARTIFACT_NAME: solux.tgz

jobs:
get-tag:
if: (github.head_ref == 'knope/pre-release' && github.event.pull_request.merged == true) || (github.event_name == 'workflow_dispatch' && github.head_ref == 'main')
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: "Get tag of latest draft release"
run: echo "tag_name=$(gh release list --repo ${{ github.repository }} --json 'isDraft,tagName' --jq '.[] | select(.isDraft) | .tagName')" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ github.token }}
id: get-tag
outputs:
tag_name: ${{ steps.get-tag.outputs.tag_name }}

build-artifacts:
needs: [get-tag]
if: needs.get-tag.outputs.tag_name != ''
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun ci

- name: Build project
run: bun run build

- name: Create artifact
run: bun pm pack --filename ${{ env.ARTIFACT_NAME }}

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: solux
path: ${{ env.ARTIFACT_NAME }}
if-no-files-found: error

release:
needs: [build-artifacts, get-tag]
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
id-token: write
contents: write
steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Set up Git user
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: .
merge-multiple: true

- name: Upload artifacts to release
run: |
gh release upload ${{ needs.get-tag.outputs.tag_name }} ${{ env.ARTIFACT_NAME }}
gh release edit ${{ needs.get-tag.outputs.tag_name }} --draft=false --latest

- name: Create tag
run: |
git tag ${{ needs.get-tag.outputs.tag_name }}
git push origin ${{ needs.get-tag.outputs.tag_name }}

- name: Publish package
run: bun publish ${{ env.ARTIFACT_NAME }}
46 changes: 30 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
# moon
.moon/cache
.moon/docker
# dependencies (bun install)
node_modules

# output
out
dist
*.tgz

# testing
# code coverage
coverage
*.lcov

# Dependencies
node_modules
# claude code
.mcp.json
.claude
specs

# Build
dist
lib/
*.tsbuildinfo
.astro/
solux.tgz
# logs
logs
*.log

# environment variables
# dotenv environment variable files
.env
.env.production
.env.development.local
.env.test.local
.env.production.local
.env.local

# caches
.cache
*.tsbuildinfo

# IntelliJ based IDEs
.idea

# macOS-specific files
.DS_Store
# Finder (MacOS) folder config
.DS_Store
13 changes: 0 additions & 13 deletions .moon/tasks.pkl

This file was deleted.

11 changes: 0 additions & 11 deletions .moon/toolchain.pkl

This file was deleted.

10 changes: 0 additions & 10 deletions .moon/workspace.pkl

This file was deleted.

8 changes: 0 additions & 8 deletions .prototools

This file was deleted.

Loading