Skip to content

Commit

Permalink
fix(config): stable release milestone (#72)
Browse files Browse the repository at this point in the history
* fix(config): renames package license

* refactor(ci): moves back workflows.release.yml

* chore(config): renames package name

* fix(deps): consolidates @types

* fix(deps): adds prettier-plugin-tailwindcss plugin

* fix(ci): favors deploy composite

* chore(ci): renames workflows

* chore(ci): test concurrency workflows

* fix(config): updates TSConfig files

* chore(config): formats code

* fix(config): passes branch to workflow.release.yml

* chore(config): rename concurrency group

* chore(config): debug branch name

* chore(config): removes needs to document

* chore(config): updates property to inputs.branch_name

* feat(config): adds vite config

* fix(config): renames URLK slug to lower-case
  • Loading branch information
csantiago132 authored Nov 8, 2024
1 parent 8d4be4a commit 85335ed
Show file tree
Hide file tree
Showing 23 changed files with 4,457 additions and 565 deletions.
48 changes: 4 additions & 44 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,11 @@
name: 'Deploy'
description: 'Deploys the application to Fly.io for staging and production environments.'

inputs:
commit_sha:
description: 'Commit SHA for deployment'
required: true
description: 'Deploys the application to Fly.io'

runs:
using: 'composite'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Read app name
uses: SebRollen/[email protected]
id: app_name
with:
file: 'fly.toml'
field: 'app'

- name: Install Flyctl
uses: superfly/flyctl-actions@master
with:
version: 'latest'

- name: Deploy Dev
if: ${{ github.ref == 'refs/heads/dev' }}
shell: bash
run: |
flyctl deploy --remote-only --verbose
- name: Deploy
uses: superfly/flyctl-actions/setup-flyctl@master
run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

- name: Deploy Production
if: ${{ github.ref == 'refs/heads/main' }}
shell: bash
run: |
flyctl deploy --remote-only --verbose
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

- name: Set Deployed Version
id: set_version
shell: bash
run: |
VERSION=$(jq -r .version package.json)
echo "deployed_version=${VERSION}" >> $GITHUB_OUTPUT
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
secrets: inherit

release:
needs: document
needs: test
uses: kurocado-studio/styleguide/.github/workflows/workflow.release.yml@main
secrets: inherit
with:
branch_name: ${{ github.ref }}
10 changes: 5 additions & 5 deletions .github/workflows/workflow.deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Deploy
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_call:
Expand All @@ -19,7 +21,5 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Deploy to Fly.io
run: flyctl deploy --remote-only --verbose
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: Deploy
uses: kurocado-studio/styleguide/.github/actions/deploy@main
4 changes: 3 additions & 1 deletion .github/workflows/workflow.document.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Document
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_call:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/workflow.lint.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Lint
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_call:

jobs:
code-quality:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow.release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ inputs.branch_name }}
cancel-in-progress: true

permissions:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/workflow.test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_call:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ repositories quickly with consistent code quality and best practices.

```bash
# If you use npm
npm install --save-dev @kurocado-studio/style-guide
npm install --save-dev @kurocado-studio/styleguide

# If you use Yarn
yarn add --dev @kurocado-studio/style-guide
yarn add --dev @kurocado-studio/styleguide
```

## Dependencies & Setup
Expand Down
29 changes: 20 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "@kurocado-studio/styleguide",
"version": "0.0.0-semantically-released",
"description": "Kurocado Studio's engineering style guide",
"homepage": "https://github.com/Kurocado-Studio/styleguide",
"homepage": "https://github.com/kurocado-studio/styleguide",
"bugs": {
"url": "https://github.com/Kurocado-Studio/styleguide/issues"
"url": "https://github.com/kurocado-studio/styleguide/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/Kurocado-Studio/styleguide.git"
"url": "https://github.com/kurocado-studio/styleguide.git"
},
"license": "MPL-2.0",
"license": "MIT",
"scripts": {
"commitlint": "pnpm exec commitlint --edit",
"eslint-check": "eslint --max-warnings=0 .",
Expand All @@ -30,10 +30,12 @@
"./release/app": "./src/semantic-release/semanticRelease.app.js",
"./release/npm": "./src/semantic-release/semanticRelease.npm.js",
"./prettier": "./src/prettier/index.js",
"./vitest/setup-node": "./src/vitest/setup.node.ts",
"./vitest/setup-web": "./src/vitest/setup.web.ts",
"./vitest/node": "./src/vitest/vitest.node.ts",
"./vitest/web": "./src/vitest/vitest.web.ts",
"./vite/config": "./src/vite/config.js",
"./vite/setup-node": "./src/vite/setup.node.js",
"./vite/setup-web": "./src/vite/setup.web.js",
"./vite/node": "./src/vite/vite.node.js",
"./vite/npm": "./src/vite/vite.npm.js",
"./vite/web": "./src/vitest/vite.web.js",
"./tsconfig/base": "./src/tsconfig/tsconfig.json",
"./tsconfig/nestjs": "./src/tsconfig/tsconfig.nestjs.json",
"./tsconfig/react": "./src/tsconfig/tsconfig.react.json",
Expand All @@ -44,7 +46,7 @@
"src/.github",
"src/commitlint",
"src/eslint",
"src/vitest",
"src/vite",
"src/prettier",
"src/semantic-release",
"src/tsconfig"
Expand All @@ -61,15 +63,22 @@
"dependencies": {
"@babel/core": "^7.24.0",
"@babel/eslint-parser": "^7.23.10",
"@remix-run/dev": "^2.13.1",
"@rushstack/eslint-patch": "^1.7.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@swc/core": "^1.7.40",
"@testing-library/jest-dom": "^6.5.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.13",
"@types/jest-axe": "^3.5.9",
"@types/lodash-es": "^4.17.12",
"@types/mdx": "^2.0.7",
"@types/node": "20.5.0",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.2.21",
"@types/supertest": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@vitejs/plugin-react": "^4.3.2",
Expand All @@ -94,8 +103,10 @@
"lint-staged": "^15.2.10",
"prettier-plugin-packagejson": "^2.4.12",
"prettier-plugin-sort-imports": "^1.8.6",
"prettier-plugin-tailwindcss": "^0.6.8",
"semantic-release-github-pullrequest": "^1.3.0",
"url-join": "^4.0.1",
"vite-plugin-dts": "^4.3.0",
"vite-tsconfig-paths": "^5.0.1",
"vitest-axe": "^0.1.0"
},
Expand Down
Loading

0 comments on commit 85335ed

Please sign in to comment.