summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release.yml18
-rw-r--r--api/package.json3
2 files changed, 10 insertions, 11 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index da101642..b189f3bc 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -14,13 +14,16 @@ jobs:
         os: [windows, macos, ubuntu]
         include:
           - os: windows
-            build: npx caxa -i . -m 'This_may_take_a_while_to_run_the_first_time_please_wait...' --output 'fosscord-server-windows.exe' -- '{{caxa}}/node_modules/.bin/node' '{{caxa}}/dist/start.js'
+            file: fosscord-server-windows.exe
+            package: ""
             artifact: fosscord-server-windows.exe
           - os: macos
-            build: npx caxa -i . -m 'This may take a while to run the first time, please wait...' --output 'fosscord-server.app' -- '{{caxa}}/node_modules/.bin/node' '{{caxa}}/dist/start.js' && tar -czf 'fosscord-server-macos.app.tgz' 'fosscord-server.app'
+            file: fosscord-server.app
+            package: tar -czf 'fosscord-server-macos.app.tgz' 'fosscord-server.app'
             artifact: fosscord-server-macos.app.tgz
           - os: ubuntu
-            build: npx caxa -i . -m 'This may take a while to run the first time, please wait...' --output 'fosscord' -- '{{caxa}}/node_modules/.bin/node' '{{caxa}}/dist/start.js' && tar -czf 'fosscord-server-linux.tgz' 'fosscord'
+            file: fosscord
+            package: chmod +x fosscord && tar -czf 'fosscord-server-linux.tgz' 'fosscord'
             artifact: fosscord-server-linux.tgz
     runs-on: ${{ matrix.os }}-latest
     steps:
@@ -49,13 +52,10 @@ jobs:
           npm run build
           npm pack
           cd ../bundle
-          npm i ../util/fosscord-util-1.0.0.tgz
-          npm i ../cdn/fosscord-cdn-1.0.0.tgz
-          npm i ../gateway/fosscord-gateway-1.0.0.tgz
-          npm i ../api/fosscord-api-1.0.0.tgz
-          npm i caxa
+          npm i ../cdn/fosscord-cdn-1.0.0.tgz ../gateway/fosscord-gateway-1.0.0.tgz ../api/fosscord-api-1.0.0.tgz ../util/fosscord-util-1.0.0.tgz caxa
           npm run build:bundle
-          ${{ matrix.build }}
+          npx caxa -i . -m 'This_may_take_a_while_to_run_the_first_time_please_wait...' --output '${{matrix.file}}' -- '{{caxa}}/node_modules/.bin/node' '{{caxa}}/dist/start.js'
+          ${{ matrix.package }}
       - uses: actions/upload-artifact@v2
         with:
           name: ${{ matrix.artifact }}
diff --git a/api/package.json b/api/package.json
index 79b548e7..a501fb15 100644
--- a/api/package.json
+++ b/api/package.json
@@ -5,14 +5,13 @@
 	"main": "dist/Server.js",
 	"types": "dist/Server.d.ts",
 	"scripts": {
-		"preinstall": "npm i -g patch-package",
 		"test": "npm run build && jest --coverage --verbose --forceExit ./tests",
 		"test:watch": "jest --watch",
 		"start": "npm run build && node dist/start",
 		"build": "npx tsc -b .",
 		"build-docker": "tsc -p tsconfig-docker.json",
 		"dev": "tsnd --respawn src/start.ts",
-		"patch": "patch-package",
+		"patch": "npx patch-package",
 		"postinstall": "npm run patch"
 	},
 	"repository": {