Skip to content

Commit 8d866d0

Browse files
authored
🔧 chore: Add CI (#1)
1 parent 38687a4 commit 8d866d0

File tree

11 files changed

+10061
-14542
lines changed

11 files changed

+10061
-14542
lines changed

.github/workflows/qa.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: QA checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
lint:
10+
name: Lint & build package
11+
runs-on: [ self-hosted, Linux ]
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 18.18
20+
21+
- name: Install deps
22+
run: |
23+
npm ci
24+
25+
cd extensions/common
26+
npm ci
27+
28+
cd ../module
29+
npm ci
30+
31+
cd ../sync-hook
32+
npm ci
33+
34+
- name: Build & lint
35+
run: |
36+
npm run set-production-config
37+
38+
cd extensions/module
39+
npm run lint
40+
npm run build
41+
42+
cd ../sync-hook
43+
npm run lint
44+
npm run build

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
ci:
14+
name: CI Init
15+
runs-on: [ self-hosted, Linux ]
16+
outputs:
17+
action: ${{ steps.init.outputs.action }}
18+
steps:
19+
- id: init
20+
uses: localazy/release/init@v2
21+
22+
prepare:
23+
name: Prepare Release PR
24+
needs: ci
25+
if: needs.ci.outputs.action == 'prepare'
26+
runs-on: [ self-hosted, Linux ]
27+
steps:
28+
- uses: localazy/release/prepare@v2
29+
with:
30+
app-id: ${{ secrets.AUTH_APP_ID }}
31+
app-key: ${{ secrets.AUTH_APP_KEY }}
32+
monorepo-bump: |
33+
''
34+
'extensions/common'
35+
'extensions/module'
36+
'extensions/sync-hook'
37+
38+
publish:
39+
name: Publish Release
40+
needs: ci
41+
if: needs.ci.outputs.action == 'publish'
42+
runs-on: [ self-hosted, Linux ]
43+
steps:
44+
- uses: localazy/release/publish@v2
45+
with:
46+
app-id: ${{ secrets.AUTH_APP_ID }}
47+
app-key: ${{ secrets.AUTH_APP_KEY }}
48+
run-after-install: npm run set-production-config
49+
monorepo-public-npm-token: ${{ secrets.NPM_AUTH_TOKEN_PUBLIC }}
50+
monorepo-public-npm: |
51+
'extensions/module'
52+
'extensions/sync-hook'

development/extensions/directus-extension-localazy/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
},
2222
"scripts": {
2323
"build": "directus-extension build",
24-
"lint": "eslint --ext .ts,.vue src",
25-
"prepare": "npm run build"
24+
"lint": "eslint --ext .ts,.vue src"
2625
},
2726
"dependencies": {
2827
"@localazy/api-client": "^2.1.5",

0 commit comments

Comments
 (0)