✨ bundle exectuable
This commit is contained in:
parent
cce9358d85
commit
c22fe86c46
40
.github/workflows/release.yml
vendored
Normal file
40
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
# Sequence of patterns matched against refs/tags
|
||||||
|
tags:
|
||||||
|
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
|
name: Publish Release
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Publish Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Build # This would actually build your project, using zip for an example artifact
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run bundle
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: Release ${{ github.ref }}
|
||||||
|
draft: true
|
||||||
|
prerelease: true
|
||||||
|
- name: Upload Release Asset
|
||||||
|
id: upload-release-asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||||
|
asset_path: ./build/api-linux
|
||||||
|
asset_name: server-api-linux
|
||||||
|
asset_content_type: application/x-binary
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -81,6 +81,7 @@ typings/
|
|||||||
# Nuxt.js build / generate output
|
# Nuxt.js build / generate output
|
||||||
.nuxt
|
.nuxt
|
||||||
dist
|
dist
|
||||||
|
build
|
||||||
|
|
||||||
# Gatsby files
|
# Gatsby files
|
||||||
.cache/
|
.cache/
|
||||||
|
|||||||
BIN
package-lock.json
generated
BIN
package-lock.json
generated
Binary file not shown.
@ -11,7 +11,7 @@
|
|||||||
"start": "npm run build && node dist/start",
|
"start": "npm run build && node dist/start",
|
||||||
"build": "tsc -b .",
|
"build": "tsc -b .",
|
||||||
"dev": "tsnd --respawn src/start.ts",
|
"dev": "tsnd --respawn src/start.ts",
|
||||||
"bundle": "npm run build && pkg package.json"
|
"bundle": "npm run build && pkg --no-bytecode --public-packages=* package.json"
|
||||||
},
|
},
|
||||||
"pkg": {
|
"pkg": {
|
||||||
"scripts": [
|
"scripts": [
|
||||||
@ -19,7 +19,8 @@
|
|||||||
],
|
],
|
||||||
"assets": [
|
"assets": [
|
||||||
"locales",
|
"locales",
|
||||||
"assets"
|
"assets",
|
||||||
|
"client_test"
|
||||||
],
|
],
|
||||||
"targets": [
|
"targets": [
|
||||||
"latest-linux-x64",
|
"latest-linux-x64",
|
||||||
@ -67,7 +68,7 @@
|
|||||||
"i18next-node-fs-backend": "^2.1.3",
|
"i18next-node-fs-backend": "^2.1.3",
|
||||||
"image-size": "^1.0.0",
|
"image-size": "^1.0.0",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
"lambert-server": "^1.2.5",
|
"lambert-server": "^1.2.7",
|
||||||
"missing-native-js-functions": "^1.2.6",
|
"missing-native-js-functions": "^1.2.6",
|
||||||
"mongoose": "^5.12.3",
|
"mongoose": "^5.12.3",
|
||||||
"mongoose-autopopulate": "^0.12.3",
|
"mongoose-autopopulate": "^0.12.3",
|
||||||
|
|||||||
@ -105,7 +105,7 @@ export class FosscordServer extends Server {
|
|||||||
app.use("/api/v9", prefix);
|
app.use("/api/v9", prefix);
|
||||||
this.app = app;
|
this.app = app;
|
||||||
this.app.use(ErrorHandler);
|
this.app.use(ErrorHandler);
|
||||||
const indexHTML = await fs.readFile(path.join(__dirname, "..", "client_test", "index.html"), { encoding: "utf8" });
|
const indexHTML = fs.readFileSync(path.join(__dirname, "..", "client_test", "index.html"), { encoding: "utf8" });
|
||||||
|
|
||||||
this.app.use("/assets", express.static(path.join(__dirname, "..", "assets")));
|
this.app.use("/assets", express.static(path.join(__dirname, "..", "assets")));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user