File tree Expand file tree Collapse file tree 4 files changed +63
-4
lines changed Expand file tree Collapse file tree 4 files changed +63
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to NPM
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ # package-major.minor.patch - required
7
+ # -beta.build - optional
8
+ - ' *-*.*.*'
9
+
10
+ jobs :
11
+ build :
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - id : get-package
16
+ run : |
17
+ PACKAGE_NAME=$(echo ${GITHUB_REF#refs/tags/} | cut -d- -f1)
18
+ ALLOWED_PACKAGES=("phaser") # Add more package names if needed
19
+ if [[ " ${ALLOWED_PACKAGES[@]} " =~ " ${PACKAGE_NAME} " ]]; then
20
+ echo "::set-output name=package::${PACKAGE_NAME}"
21
+ else
22
+ echo "Invalid package name ${PACKAGE_NAME}."
23
+ exit 1
24
+ fi
25
+ shell : bash
26
+
27
+ - uses : actions/checkout@v4
28
+
29
+ - name : Use Node.js
30
+ uses : actions/setup-node@v4
31
+ with :
32
+ node-version : ' 20'
33
+ registry-url : ' https://registry.npmjs.org'
34
+
35
+ - name : Check version
36
+ run : |
37
+ TAG_VERSION=$(echo ${GITHUB_REF#refs/tags/${{ steps.get-package.outputs.package }}-})
38
+ PACKAGE_VERSION=$(node -p "require('./packages/${{ steps.get-package.outputs.package }}/package.json').version")
39
+ if [[ "${TAG_VERSION}" != "${PACKAGE_VERSION}" ]]; then
40
+ echo "Tag version ${TAG_VERSION} does not match package version ${PACKAGE_VERSION}."
41
+ exit 1
42
+ fi
43
+
44
+ - name : Install dependencies
45
+ run : npm ci
46
+
47
+ - name : Build
48
+ run : npm run build --workspace @barinbritva/${{ steps.get-package.outputs.package }}-sdk
49
+
50
+ - name : Publish
51
+ run : cd packages/${{ steps.get-package.outputs.package }} && npm publish --access=public
52
+ env :
53
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1
- # gamefi -sdk
1
+ # game-engines -sdk
2
2
3
- TON bindings and utilities for game engines:
3
+ TON blockchain bindings and utilities for game engines:
4
4
* Phaser.io
5
5
* Cocos2d (coming soon)
6
6
7
7
# Getting started
8
8
Installation:
9
9
``` sh
10
- npm install --save @ton-community/gamefi- phaser
10
+ npm install --save @barinbritva/ phaser-sdk
11
11
```
12
12
13
13
Creating GameFi instance:
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @barinbritva/game-engines-sdk" ,
3
- "private" : true ,
4
3
"engines" : {
5
4
"node" : " >=18.0.0" ,
6
5
"npm" : " >=9.0.0"
Original file line number Diff line number Diff line change
1
+ # phaser-sdk
2
+
3
+ TON blockchain bindings and utilities for [ Phaser.io] ( https://phaser.io/ ) game engine.
4
+
5
+ # Documentation
6
+
7
+ Please read the documentation in the official [ repository] ( https://github.com/barinbritva/game-engines-sdk ) .
You can’t perform that action at this time.
0 commit comments