Skip to content

Commit

Permalink
add publish frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
dzencot committed Sep 25, 2023
1 parent 70adbe1 commit 7f93636
Show file tree
Hide file tree
Showing 8 changed files with 365 additions and 284 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: On Release Frontend

on:
push:
tags:
- v*

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20.x'
- name: Install
run: make install -c frontend
- name: Run linter
run: make lint
- name: Run tests
run: make test
- name: Build dist
run: make build
- name: Publish
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPMJS_COM }}
make publish
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
setup:
cd frontend && npm install
npm install
./gradlew wrapper --gradle-version 8.3
./gradlew build

frontend:
cd frontend && npm run dev
npx start-frontend

backend:
./gradlew bootRun --args='--spring.profiles.active=dev'
Expand Down Expand Up @@ -40,7 +40,7 @@ test:
# ./gradlew jacocoTestReport

update-js-deps:
cd frontend && npx ncu -u
npx ncu -u

check-java-deps:
./gradlew dependencyUpdates -Drevision=release
Expand Down
18 changes: 18 additions & 0 deletions frontend/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
start:
npm start

install:
npm i

build:
npm run build

publish:
npm publish --access=public

lint:
npx eslint .

# TODO: добавить тесты
test:
echo no tests
Loading

0 comments on commit 7f93636

Please sign in to comment.