Skip to content

Commit 7f93636

Browse files
committed
add publish frontend
1 parent 70adbe1 commit 7f93636

File tree

8 files changed

+365
-284
lines changed

8 files changed

+365
-284
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: On Release Frontend
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
working-directory: ./frontend
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '20.x'
20+
- name: Install
21+
run: make install -c frontend
22+
- name: Run linter
23+
run: make lint
24+
- name: Run tests
25+
run: make test
26+
- name: Build dist
27+
run: make build
28+
- name: Publish
29+
run: |
30+
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPMJS_COM }}
31+
make publish

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
setup:
2-
cd frontend && npm install
2+
npm install
33
./gradlew wrapper --gradle-version 8.3
44
./gradlew build
55

66
frontend:
7-
cd frontend && npm run dev
7+
npx start-frontend
88

99
backend:
1010
./gradlew bootRun --args='--spring.profiles.active=dev'
@@ -40,7 +40,7 @@ test:
4040
# ./gradlew jacocoTestReport
4141

4242
update-js-deps:
43-
cd frontend && npx ncu -u
43+
npx ncu -u
4444

4545
check-java-deps:
4646
./gradlew dependencyUpdates -Drevision=release

frontend/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
start:
2+
npm start
3+
4+
install:
5+
npm i
6+
7+
build:
8+
npm run build
9+
10+
publish:
11+
npm publish --access=public
12+
13+
lint:
14+
npx eslint .
15+
16+
# TODO: добавить тесты
17+
test:
18+
echo no tests

0 commit comments

Comments
 (0)