mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: concurrency
This commit is contained in:
1 parent
082e41bd76
commit
3ecc87431a
2 files changed
+15
-17
No files matched your search
@@ -1,9 +1,10 @@
|
|||||||
name: CD Build Assets
|
name: CD Build Assets
|
||||||
|
|
||||||
on:
|
on: [push, workflow_dispatch]
|
||||||
push:
|
|
||||||
branches: 1.16.0
|
concurrency:
|
||||||
workflow_dispatch:
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import { extractModel } from '../../src/core/blitz/extractModel';
|
|||||||
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
import { readXMLDVPL } from '../../src/core/blitz/readXMLDVPL';
|
||||||
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
import { readYAMLDVPL } from '../../src/core/blitz/readYAMLDVPL';
|
||||||
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
import { toUniqueId } from '../../src/core/blitz/toUniqueId';
|
||||||
import { commitAssets } from '../../src/core/blitzkrieg/commitAssets';
|
import { AssetCommit } from '../../src/core/github/assetCommit';
|
||||||
import { FileChange } from '../../src/core/blitzkrieg/commitMultipleFiles';
|
|
||||||
import { DATA, POI } from './constants';
|
import { DATA, POI } from './constants';
|
||||||
import { VehicleDefinitionList } from './definitions';
|
import { VehicleDefinitionList } from './definitions';
|
||||||
import { TankParameters } from './tankIcons';
|
import { TankParameters } from './tankIcons';
|
||||||
@@ -25,8 +24,8 @@ export async function tankModels(production: boolean) {
|
|||||||
|
|
||||||
for (const nationIndex in nations) {
|
for (const nationIndex in nations) {
|
||||||
const nation = nations[nationIndex];
|
const nation = nations[nationIndex];
|
||||||
const changes: FileChange[] = [];
|
// const changes: FileChange[] = [];
|
||||||
// const assetCommit = new AssetCommit(`tank models ${nation}`, production);
|
const assetCommit = new AssetCommit(`tank models ${nation}`, production);
|
||||||
const tanks = await readXMLDVPL<{ root: VehicleDefinitionList }>(
|
const tanks = await readXMLDVPL<{ root: VehicleDefinitionList }>(
|
||||||
`${DATA}/${POI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
|
`${DATA}/${POI.vehicleDefinitions}/${nation}/list.xml.dvpl`,
|
||||||
);
|
);
|
||||||
@@ -60,17 +59,15 @@ export async function tankModels(production: boolean) {
|
|||||||
|
|
||||||
// writeFile(`test.${tankKey}.glb`, await nodeIO.writeBinary(model));
|
// writeFile(`test.${tankKey}.glb`, await nodeIO.writeBinary(model));
|
||||||
|
|
||||||
changes.push({
|
assetCommit.add(
|
||||||
path: `3d/tanks/models/${id}.glb`,
|
`3d/tanks/models/${id}.glb`,
|
||||||
content: Buffer.from(await nodeIO.writeBinary(model)).toString(
|
Buffer.from(await nodeIO.writeBinary(model)).toString('base64'),
|
||||||
'base64',
|
'base64',
|
||||||
),
|
);
|
||||||
encoding: 'base64',
|
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
// assetCommit.push();
|
assetCommit.push();
|
||||||
await commitAssets(`tank models ${nation}`, changes, production);
|
// await commitAssets(`tank models ${nation}`, changes, production);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user