@directivegames/genesys.sdk 3.3.1 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,11 +27,11 @@ const isInstalledAsDependency = __dirname.includes('node_modules');
27
27
  if (isInstalledAsDependency) {
28
28
  try {
29
29
  // Read package.json to get the package name
30
- const packageJsonPath = path.resolve(__dirname, '../../package.json');
30
+ const packageJsonPath = path.resolve(__dirname, '../package.json');
31
31
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
32
32
  const packageName = packageJson.name;
33
33
  // Source: assets folder in this package
34
- const sourceAssetsDir = path.resolve(__dirname, '../../assets');
34
+ const sourceAssetsDir = path.resolve(__dirname, '../assets');
35
35
  // Find the parent project root
36
36
  const parentProjectRoot = findProjectRoot();
37
37
  if (!parentProjectRoot) {
@@ -8,11 +8,14 @@ export const packProjectFiles = {
8
8
  packageJson: {
9
9
  name: '',
10
10
  version: '0.0.1',
11
+ publishConfig: {
12
+ 'access': 'public'
13
+ },
11
14
  scripts: {
12
15
  'build': 'tsc',
13
16
  'pack': 'pnpm build && pnpm pack',
14
17
  'lint': 'eslint . --fix --ext .ts,.tsx',
15
- 'postinstall': 'tsx scripts/postinstall.ts'
18
+ 'postinstall': 'pnpm dlx tsx scripts/post-install.ts'
16
19
  },
17
20
  keywords: [],
18
21
  type: 'module',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@directivegames/genesys.sdk",
3
- "version": "3.3.1",
3
+ "version": "3.3.3",
4
4
  "description": "Genesys SDK - A development toolkit for game development",
5
5
  "author": "Directive Games",
6
6
  "main": "index.js",
@@ -10,6 +10,9 @@
10
10
  "electron"
11
11
  ]
12
12
  },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
13
16
  "files": [
14
17
  "dist/src",
15
18
  "src/templates",
@@ -0,0 +1,90 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version_type:
7
+ description: 'Version bump type'
8
+ required: true
9
+ type: choice
10
+ options:
11
+ - patch
12
+ - minor
13
+ - major
14
+ default: 'patch'
15
+
16
+ permissions:
17
+ id-token: write # Required for OIDC
18
+ contents: write
19
+
20
+ jobs:
21
+ publish:
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v4
26
+ with:
27
+ token: ${{ secrets.GITHUB_TOKEN }}
28
+ lfs: true
29
+
30
+ - name: Setup pnpm
31
+ uses: pnpm/action-setup@v4
32
+ with:
33
+ version: 9
34
+
35
+ - name: Setup Node.js
36
+ uses: actions/setup-node@v4
37
+ with:
38
+ node-version: '20'
39
+ registry-url: 'https://registry.npmjs.org'
40
+ cache: 'pnpm'
41
+
42
+ - name: Update npm to latest
43
+ run: npm install -g npm@latest
44
+
45
+ - name: Install dependencies
46
+ run: pnpm install
47
+
48
+ - name: Configure git
49
+ run: |
50
+ git config user.name "github-actions[bot]"
51
+ git config user.email "github-actions[bot]@users.noreply.github.com"
52
+
53
+ - name: Bump version
54
+ id: version
55
+ run: |
56
+ # Get current version
57
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
58
+ echo "Current version: $CURRENT_VERSION"
59
+
60
+ # Bump version using npm (doesn't require npm auth)
61
+ npm version ${{ github.event.inputs.version_type }} --no-git-tag-version
62
+
63
+ # Get new version
64
+ NEW_VERSION=$(node -p "require('./package.json').version")
65
+ echo "New version: $NEW_VERSION"
66
+ echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
67
+
68
+ - name: Build
69
+ run: pnpm build
70
+
71
+ - name: Publish to npm
72
+ run: pnpm publish --no-git-checks
73
+
74
+ - name: Commit and push version bump
75
+ run: |
76
+ git add package.json
77
+ git commit -m "chore: bump version to ${{ steps.version.outputs.new_version }}"
78
+ git tag "v${{ steps.version.outputs.new_version }}"
79
+ git push
80
+ git push --tags
81
+
82
+ - name: Create GitHub Release
83
+ uses: softprops/action-gh-release@v2
84
+ with:
85
+ tag_name: v${{ steps.version.outputs.new_version }}
86
+ name: v${{ steps.version.outputs.new_version }}
87
+ generate_release_notes: true
88
+ env:
89
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90
+
@@ -35,12 +35,12 @@ const isInstalledAsDependency = __dirname.includes('node_modules');
35
35
  if (isInstalledAsDependency) {
36
36
  try {
37
37
  // Read package.json to get the package name
38
- const packageJsonPath = path.resolve(__dirname, '../../package.json');
38
+ const packageJsonPath = path.resolve(__dirname, '../package.json');
39
39
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
40
40
  const packageName = packageJson.name;
41
41
 
42
42
  // Source: assets folder in this package
43
- const sourceAssetsDir = path.resolve(__dirname, '../../assets');
43
+ const sourceAssetsDir = path.resolve(__dirname, '../assets');
44
44
 
45
45
  // Find the parent project root
46
46
  const parentProjectRoot = findProjectRoot();