From d4dca7f79e10ee35b5b8b64af4d28fec3b835a5e Mon Sep 17 00:00:00 2001 From: Anton Franzluebbers Date: Tue, 19 Jul 2022 19:36:01 -0400 Subject: [PATCH] set up ci for unity package --- .github/workflows/ci.yml | 28 +++++++++++++++------------- velconnect/routes/user_count.py | 4 ++-- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1387c3..aaf50bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,19 +1,21 @@ -name: CI +name: Publish to Verdaccio on: push: branches: - - main + - master jobs: - split-upm: - name: split upm branch + publish-npm: + name: publish to npm.ugavel.com runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: split upm branch - run: | - git subtree split -P "$PKG_ROOT" -b upm - git push -u origin upm - env: - PKG_ROOT: unity_package \ No newline at end of file + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: http://npm.ugavel.com/ + - name: actually publish + run: | + cd unity_package + npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.VERDACCIO_TOKEN}} \ No newline at end of file diff --git a/velconnect/routes/user_count.py b/velconnect/routes/user_count.py index 2ba4063..1a072fc 100644 --- a/velconnect/routes/user_count.py +++ b/velconnect/routes/user_count.py @@ -27,7 +27,7 @@ post_user_count_example = { } -@router.post('/update_user_count', tags=["User Count"]) +@router.post('/update_user_count') def update_user_count(data: dict): db.insert(""" REPLACE INTO `UserCount` @@ -44,7 +44,7 @@ def update_user_count(data: dict): return {'success': True} -@router.get('/get_user_count', tags=["User Count"]) +@router.get('/get_user_count') def get_user_count(hours: float = 24): values = db.query(""" SELECT timestamp, total_users