set up ci for unity package
parent
06c60d557a
commit
d4dca7f79e
|
|
@ -1,19 +1,21 @@
|
||||||
name: CI
|
name: Publish to Verdaccio
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
split-upm:
|
publish-npm:
|
||||||
name: split upm branch
|
name: publish to npm.ugavel.com
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
node-version: 16
|
||||||
- name: split upm branch
|
registry-url: http://npm.ugavel.com/
|
||||||
|
- name: actually publish
|
||||||
run: |
|
run: |
|
||||||
git subtree split -P "$PKG_ROOT" -b upm
|
cd unity_package
|
||||||
git push -u origin upm
|
npm publish
|
||||||
env:
|
env:
|
||||||
PKG_ROOT: unity_package
|
NODE_AUTH_TOKEN: ${{secrets.VERDACCIO_TOKEN}}
|
||||||
|
|
@ -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):
|
def update_user_count(data: dict):
|
||||||
db.insert("""
|
db.insert("""
|
||||||
REPLACE INTO `UserCount`
|
REPLACE INTO `UserCount`
|
||||||
|
|
@ -44,7 +44,7 @@ def update_user_count(data: dict):
|
||||||
return {'success': True}
|
return {'success': True}
|
||||||
|
|
||||||
|
|
||||||
@router.get('/get_user_count', tags=["User Count"])
|
@router.get('/get_user_count')
|
||||||
def get_user_count(hours: float = 24):
|
def get_user_count(hours: float = 24):
|
||||||
values = db.query("""
|
values = db.query("""
|
||||||
SELECT timestamp, total_users
|
SELECT timestamp, total_users
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue