Skip to content

Commit

Permalink
Сборка в нативки
Browse files Browse the repository at this point in the history
  • Loading branch information
JoCat committed Apr 26, 2021
1 parent 51539c2 commit 0275b61
Show file tree
Hide file tree
Showing 6 changed files with 1,358 additions and 22 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true

[*.yml]
indent_size = 2
26 changes: 11 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,19 @@ jobs:
run: npm ci

- name: Build LauncherServer
run: npm run build:prod
run: |
npm run build:prod
npm run build:bin
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.PACKAGE_VERSION }}
release_name: Aurora LauncherServer ${{ env.PACKAGE_VERSION }}

- name: Upload release
uses: actions/upload-release-asset@v1
name: Aurora LauncherServer ${{ env.PACKAGE_VERSION }}
files: |
dist/LauncherServer.js
dist/LauncherServer_win64.exe
dist/LauncherServer_linux64
dist/LauncherServer_mac64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/LauncherServer.js
asset_name: LauncherServer.js
asset_content_type: application/javascript
6 changes: 4 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ jobs:
run: npm ci

- name: Build LauncherServer
run: npm run build:dev
run: |
npm run build:dev
npm run build:bin
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.0
with:
name: LauncherServer Testing
path: dist
if-no-files-found: error
retention-days: 30
retention-days: 30
32 changes: 32 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const { compile } = require("nexe")

const buildsList = [
{
// mac
output: "LauncherServer_mac64",
targets: ["mac-x64-12.18.2"],
},
{
// linux
output: "LauncherServer_linux64",
targets: ["linux-x64-12.16.2"],
},
{
// windows
output: "LauncherServer_win64.exe",
targets: ["windows-x64-12.18.2"],
},
]

const builds = buildsList.map((build) =>
Object.assign(build, {
// Общие параметры
input: "./LauncherServer.js",
cwd: "./dist",
})
)

builds.forEach(async (config) => {
await compile(config)
console.log(`Build for ${config.targets[0]} was successful`)
})
Loading

0 comments on commit 0275b61

Please sign in to comment.