Skip to content

Commit

Permalink
Merge pull request #2 from akashic-games/add-publish-workflow
Browse files Browse the repository at this point in the history
Add publish workflow
  • Loading branch information
blackspotbear authored Oct 9, 2024
2 parents 9f105ac + 14013e5 commit 7152a78
Show file tree
Hide file tree
Showing 10 changed files with 2,021 additions and 20 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish

on:
workflow_dispatch:

env:
TARGET_DIR: Release
NODE_VERSION: 18

jobs:
publish:
runs-on: ubuntu-latest
name: Publish
defaults:
run:
working-directory: ${{ env.TARGET_DIR }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: ${{ env.TARGET_DIR }}/package-lock.json
- name: Build and Publish
run: |
npm ci # clean install
npm publish --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/build_wasm/
/Release/*
!/Release/effekseer.d.ts
!/Release/effekseer.js
!/Release/effekseer.wasm
!/Release/package.json
!/Release/package-lock.json
!/Release/akashic-lib.json
Expand Down
12 changes: 6 additions & 6 deletions Release/Sample/game.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
"path": "script/main.js",
"global": true
},
"node_modules/@akashic-extension/effekseer-for-akashic-engine/effekseer.wasm": {
"type": "binary",
"path": "node_modules/@akashic-extension/effekseer-for-akashic-engine/effekseer.wasm"
},
"EffekseerRenderer": {
"type": "script",
"path": "script/EffekseerRenderer.js",
Expand Down Expand Up @@ -75,6 +71,10 @@
"assets/Effekseer/Blow5.efkefc": {
"type": "binary",
"path": "assets/Effekseer/Blow5.efkefc"
},
"node_modules/@akashic-extension/effekseer-for-akashic-engine/Release/effekseer.wasm": {
"type": "binary",
"path": "node_modules/@akashic-extension/effekseer-for-akashic-engine/Release/effekseer.wasm"
}
},
"environment": {
Expand All @@ -92,9 +92,9 @@
}
],
"moduleMainScripts": {
"@akashic-extension/effekseer-for-akashic-engine": "node_modules/@akashic-extension/effekseer-for-akashic-engine/effekseer.js"
"@akashic-extension/effekseer-for-akashic-engine": "node_modules/@akashic-extension/effekseer-for-akashic-engine/Release/effekseer.js"
},
"globalScripts": [
"node_modules/@akashic-extension/effekseer-for-akashic-engine/effekseer.js"
"node_modules/@akashic-extension/effekseer-for-akashic-engine/Release/effekseer.js"
]
}
8 changes: 4 additions & 4 deletions Release/Sample/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Release/Sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"typescript": "^4.7.4"
},
"dependencies": {
"@akashic-extension/effekseer-for-akashic-engine": "file:../akashic-extension-effekseer-for-akashic-engine-1.0.0.tgz"
"@akashic-extension/effekseer-for-akashic-engine": "file:../../akashic-extension-effekseer-for-akashic-engine-1.0.0-beta.0.tgz"
}
}
4 changes: 2 additions & 2 deletions Release/Sample/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function main(_param: g.GameMainParameterObject): void {
assetIds: ["player", "shot", "se"],
assetPaths: [
"/assets/Effekseer/**/*",
"/node_modules/@akashic-extension/effekseer-for-akashic-engine/effekseer.wasm"
"/node_modules/@akashic-extension/effekseer-for-akashic-engine/Release/effekseer.wasm"
]
});

Expand Down Expand Up @@ -69,7 +69,7 @@ function main(_param: g.GameMainParameterObject): void {
prepare: done => {
// Effekseer を初期化する。
// 初期化が完了してからシーンが開始されるよう、prepare 内で初期化を行う。
const wasmBinaryAsset = scene.asset.getBinary("/node_modules/@akashic-extension/effekseer-for-akashic-engine/effekseer.wasm");
const wasmBinaryAsset = scene.asset.getBinary("/node_modules/@akashic-extension/effekseer-for-akashic-engine/Release/effekseer.wasm");
effekseer.initRuntimeWithWasmBinary(
wasmBinaryAsset.data,
() => {
Expand Down
1,967 changes: 1,967 additions & 0 deletions Release/effekseer.js

Large diffs are not rendered by default.

Binary file added Release/effekseer.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion Release/akashic-lib.json → akashic-lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"assetList": [
{
"type": "binary",
"path": "effekseer.wasm"
"path": "Release/effekseer.wasm"
}
]
}
13 changes: 7 additions & 6 deletions Release/package.json → package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@akashic-extension/effekseer-for-akashic-engine",
"version": "1.0.0",
"version": "1.0.0-beta.0",
"description": "Effekseer runtime extension for Akashic Engine",
"author": "DWANGO Co., Ltd.",
"license": "MIT",
Expand All @@ -12,13 +12,14 @@
"doc": "typedoc",
"test": "echo \"Error: no test specified\" && exit 1"
},
"main": "effekseer.js",
"types": "./effekseer.d.ts",
"main": "Release/effekseer.js",
"types": "Release/effekseer.d.ts",
"files": [
"akashic-lib.json",
"effekseer.js",
"effekseer.d.ts",
"effekseer.wasm"
"LICENSE-Effekseer",
"Release/effekseer.js",
"Release/effekseer.d.ts",
"Release/effekseer.wasm"
],
"publishConfig": {
"@akashic-extension:registry": "https://registry.npmjs.org/",
Expand Down

0 comments on commit 7152a78

Please sign in to comment.