Skip to content

Commit

Permalink
reinit
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge committed Feb 9, 2024
1 parent 2495aac commit 45ddb0c
Show file tree
Hide file tree
Showing 87 changed files with 443 additions and 8,966 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/config.json

This file was deleted.

36 changes: 0 additions & 36 deletions .eslintrc.cjs

This file was deleted.

37 changes: 0 additions & 37 deletions .github/canary-version.js

This file was deleted.

15 changes: 15 additions & 0 deletions .github/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Setup Workflow
description: Composite action that sets up bun and installs dependencies
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v4
with:
node-version: 20.x

- uses: oven-sh/setup-bun@v1
with:
bun-version: 1.0.26

- run: bun install
shell: bash
53 changes: 24 additions & 29 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,39 @@ on:
branches: ["main"]
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
FORCE_COLOR: 3
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}

jobs:
build-lint:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/[email protected]

- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: 18
uses: actions/checkout@v4
- uses: ./.github/setup

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- run: bun turbo build

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: ./.github/setup

- name: Install deps (with cache)
run: pnpm install
- run: bun lint

- name: Build, lint and type-check
run: pnpm turbo build lint typecheck test
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: ./.github/setup

- name: Check workspaces
run: pnpm manypkg check
- run: bun turbo test typecheck --filter "@acme/env*"
91 changes: 0 additions & 91 deletions .github/workflows/release-canary.yaml

This file was deleted.

47 changes: 6 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,56 +13,21 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use PNPM
uses: pnpm/[email protected]

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install deps (with cache)
run: pnpm install
- name: Checkout repo
uses: actions/checkout@v4
- uses: ./.github/setup

- name: Build
run: pnpm turbo --filter "./packages/*" build
run: bun run build

# Using custom token `MY_GITHUB_TOKEN` with more access to avoid rate limiting
- name: Create Release
id: changeset
uses: changesets/[email protected].4
uses: changesets/[email protected].1
with:
commit: "chore(release): 📦 version packages"
title: "chore(release): 📦 version packages"
publish: npx changeset publish
publish: bunx changeset publish
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# Changeset has some issues with pnpm so we sync it up manually
- name: Sync lockfile if necessary
if: steps.changeset.outputs.hasChangesets == 'true'
run: |
git checkout changeset-release/main
pnpm install --no-frozen-lockfile
git add .
git commit -m "chore(release): 📦 sync lockfile"
git push origin changeset-release/main
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ node_modules/
package-lock.json
yarn.lock

# GENERATED CONTENT
.map.ts
.contentlayer

# TESTING
/coverage
*.lcov
Expand Down
8 changes: 0 additions & 8 deletions .npmrc

This file was deleted.

15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"tailwindCSS.experimental.configFile": "./docs/tailwind.config.ts",
"tailwindCSS.experimental.classRegex": [
["clsx\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
],
"mdx.experimentalLanguageServer": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
Loading

0 comments on commit 45ddb0c

Please sign in to comment.