Skip to content

Commit facd143

Browse files
authored
Merge pull request #22 from Lazy-And-Focused/issue-19/packages
Issue 19/packages #19
2 parents 11c7391 + 7e7d24d commit facd143

File tree

199 files changed

+2160
-16552
lines changed

Some content is hidden

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

199 files changed

+2160
-16552
lines changed
Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
33

44
name: Node.js CI
5+
run-name: Check code by ${{ github.actor }} from '${{ github.event.head_commit.message }}''
56

67
on:
78
push:
8-
branches: ["main", "dev"]
9+
branches: ["main"]
910
pull_request:
1011
branches: ["main", "dev"]
1112

1213
permissions:
1314
contents: write
1415

1516
jobs:
16-
scan_and_fix:
17+
backend:
1718
runs-on: ubuntu-latest
1819

1920
steps:
@@ -34,19 +35,51 @@ jobs:
3435

3536
- name: "[BACKEND] Eslint ⇒ Scan and fix"
3637
run: pnpm --filter backend run lint
38+
continue-on-error: false
39+
40+
- name: Save Changes ⇒ Commit formatted code
41+
run: |
42+
git config --global user.name 'github-actions[bot]'
43+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
44+
git add .
45+
git commit -m "${{ github.event.head_commit.message }} (formatted ~~ backend)
46+
47+
Co-authored-by: ${{ github.event.head_commit.author.name }} <${{ github.event.head_commit.author.email }}>"
48+
git push
3749
continue-on-error: true
3850

51+
frontend:
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- uses: actions/checkout@v4
56+
57+
- uses: pnpm/action-setup@v2
58+
with:
59+
version: 10.4.0
60+
61+
- uses: actions/setup-node@v4
62+
name: Node.js ⇒ 20.x
63+
with:
64+
node-version: 20.x
65+
cache: "pnpm"
66+
67+
- name: pnpm ⇒ Install dependencies
68+
run: pnpm install
69+
3970
- name: "[FRONTEND] Code Style ⇒ Scan and fix"
4071
run: |
4172
pnpm --filter frontend run format
4273
pnpm --filter frontend run lint
43-
continue-on-error: true
74+
continue-on-error: false
4475

4576
- name: Save Changes ⇒ Commit formatted code
4677
run: |
4778
git config --global user.name 'github-actions[bot]'
4879
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
4980
git add .
50-
git commit -m '${{ github.event.head_commit.message }} (formatted)'
81+
git commit -m "${{ github.event.head_commit.message }} (formatted ~~ frontend)
82+
83+
Co-authored-by: ${{ github.event.head_commit.author.name }} <${{ github.event.head_commit.author.email }}>"
5184
git push
5285
continue-on-error: true
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: publishing packages CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- packages
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Use Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "20.x"
19+
registry-url: https://registry.npmjs.org
20+
- name: pnpm-setup
21+
uses: pnpm/action-setup@v2
22+
23+
- name: "Installing dependencies"
24+
run: pnpm install
25+
26+
- name: "Building packages"
27+
run: pnpm run build:packages
28+
29+
- name: "Publishing @lafka/types"
30+
run: cd packages/types && npm publish --access public
31+
continue-on-error: true
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
35+
- name: "Publishing @lafka/rights"
36+
run: cd packages/rights && npm publish --access public
37+
continue-on-error: true
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
41+
- name: "Publishing @lafka/frapi"
42+
run: cd packages/frapi && npm publish --access public
43+
continue-on-error: true
44+
env:
45+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
47+
- name: "Publishing @lafka/database"
48+
run: cd packages/database && npm publish --access public
49+
continue-on-error: true
50+
env:
51+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.bat
33
.vscode/
44
.vs/
5+
pnpm-lock.yaml
56

67
# Logs
78
logs/

README.md

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

apps/backend/.env.example

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

apps/backend/.gitignore

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

0 commit comments

Comments
 (0)