-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
525e8ed
commit e830865
Showing
9 changed files
with
17,210 additions
and
16,367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: publish ccx and make tag | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
description: 'tag name' | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Create Release Asset | ||
shell: bash | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
node build-script\pack-ccx.mjs --version 1.3.2 | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ github.event.inputs.tag_name }} | ||
release_name: v${{ github.event.inputs.tag_name }} | ||
draft: true | ||
prerelease: false | ||
|
||
- name: Upload ZIP | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./Auto.Photoshop.SD.plugin_v${{ github.event.inputs.tag_name }}.zip | ||
asset_name: Auto.Photoshop.SD.plugin_v${{ github.event.inputs.tag_name }}.zip | ||
|
||
- name: Upload CCX | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./Auto.Photoshop.SD.plugin_v${{ github.event.inputs.tag_name }}.ccx | ||
asset_name: Auto.Photoshop.SD.plugin_v${{ github.event.inputs.tag_name }}.ccx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import chalk from 'chalk'; | ||
import { program } from 'commander'; | ||
import { createWriteStream, readFileSync, statSync, writeFileSync } from 'fs'; | ||
import { globSync } from 'glob'; | ||
import { dirname, join, relative } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import yazl from 'yazl' | ||
|
||
const __dirname = dirname(fileURLToPath(import.meta.url)) | ||
const basePath = join(__dirname, '..') | ||
|
||
program | ||
.requiredOption("--version <platform>", "the target platform") | ||
.parse(); | ||
|
||
const version = program.opts().version; | ||
if (!version.match(/\d+\.\d+\.\d+/)) throw new Error(`invalid version format: ${version}`); | ||
|
||
console.log(chalk.cyan("rewriting manifest.json's version field to " + version)); | ||
const manifest = JSON.parse(readFileSync(`${basePath}/manifest.json`, 'utf-8')); | ||
manifest.version = version; | ||
writeFileSync(`${basePath}/manifest.json`, JSON.stringify(manifest)); | ||
|
||
console.log(chalk.cyan("rewriting package.json's version field to " + version)); | ||
const packageJSON = JSON.parse(readFileSync(`${basePath}/package.json`, 'utf-8')); | ||
packageJSON.version = version; | ||
writeFileSync(`${basePath}/package.json`, JSON.stringify(packageJSON)); | ||
|
||
console.log(chalk.cyan("packaging .ccx")); | ||
const zipList = [ | ||
'./manifest.json', | ||
'./i18n/**/*', | ||
'./icon/**/*', | ||
'./jimp/**/*', | ||
'./scripts/**/*', | ||
'./typescripts/dist/**/*', | ||
'./utility/**/*', | ||
'./server/**/*', | ||
'./*.js', | ||
'./package.json', | ||
'./tsconfig.json', | ||
'./*.html', | ||
'./*.py', | ||
'./*.txt', | ||
'./*.md', | ||
'./*.png', | ||
] | ||
|
||
const zipfile = new yazl.ZipFile(); | ||
|
||
zipList.forEach(globber => { | ||
globSync( | ||
join(basePath, globber).replace(/\\/g, '/') | ||
).forEach(filepath => { | ||
if (statSync(filepath).isDirectory()) return; | ||
|
||
const rpath = relative(basePath, filepath); | ||
zipfile.addFile(filepath, rpath) | ||
}) | ||
}) | ||
|
||
zipfile.outputStream.pipe( | ||
createWriteStream(join(basePath, `Auto.Photoshop.SD.plugin_v${version}.ccx`)) | ||
); | ||
zipfile.outputStream.pipe( | ||
createWriteStream(join(basePath, `Auto.Photoshop.SD.plugin_v${version}.zip`)) | ||
); | ||
|
||
zipfile.end() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,213 +1 @@ | ||
{ | ||
"id": "auto.photoshop.stable.diffusion.plugin", | ||
"name": "Auto Photoshop Stable Diffusion Plugin", | ||
"version": "1.1.0", | ||
"host": [ | ||
{ | ||
"app": "PS", | ||
"minVersion": "24.0.0" | ||
} | ||
], | ||
"main": "index.html", | ||
"manifestVersion": 5, | ||
"requiredPermissions": { | ||
"network": { | ||
"domains": "all" | ||
}, | ||
"launchProcess": { | ||
"schemes": [ | ||
"http", | ||
"https", | ||
"mailto" | ||
], | ||
"extensions": [ | ||
".png", | ||
".jpg", | ||
".pdf", | ||
"" | ||
] | ||
}, | ||
"clipboard": "readAndWrite", | ||
"localFileSystem": "request", | ||
"ipc": { | ||
"enablePluginCommunication": true | ||
} | ||
}, | ||
"entrypoints": [ | ||
{ | ||
"type": "panel", | ||
"id": "main_panel", | ||
"label": { | ||
"default": "Auto-Photoshop-SD", | ||
"en-US": "Auto-Photoshop-SD", | ||
"es-ES": "Auto-Photoshop-SD", | ||
"zh-CN": "SD插件(明空汉化)" | ||
}, | ||
"minimumSize": { | ||
"width": 400, | ||
"height": 800 | ||
}, | ||
"maximumSize": { | ||
"width": 1200, | ||
"height": 10000 | ||
}, | ||
"preferredDockedSize": { | ||
"width": 150, | ||
"height": 800 | ||
}, | ||
"preferredFloatingSize": { | ||
"width": 300, | ||
"height": 800 | ||
}, | ||
"commands": [ | ||
{ | ||
"id": "show_alert", | ||
"label": { | ||
"default": "Show Alert", | ||
"en-US": "Show Alert (US)", | ||
"es-ES": "Show Alert (ES)" | ||
} | ||
} | ||
], | ||
"icons": [ | ||
{ | ||
"width": 23, | ||
"height": 23, | ||
"path": "icon/panel.png", | ||
"scale": [ | ||
1, | ||
2 | ||
], | ||
"theme": [ | ||
"all" | ||
], | ||
"species": [ | ||
"chrome" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "panel", | ||
"id": "second_panel", | ||
"label": { | ||
"default": "Second Auto-Photoshop-SD", | ||
"en-US": "Second Auto-Photoshop-SD", | ||
"es-ES": "Second Auto-Photoshop-SD", | ||
"zh-CN": "SD插件(明空汉化)" | ||
}, | ||
"minimumSize": { | ||
"width": 100, | ||
"height": 100 | ||
}, | ||
"maximumSize": { | ||
"width": 1200, | ||
"height": 10000 | ||
}, | ||
"preferredDockedSize": { | ||
"width": 150, | ||
"height": 800 | ||
}, | ||
"preferredFloatingSize": { | ||
"width": 300, | ||
"height": 800 | ||
}, | ||
"commands": [ | ||
{ | ||
"id": "show_alert", | ||
"label": { | ||
"default": "Show Alert", | ||
"en-US": "Show Alert (US)", | ||
"es-ES": "Show Alert (ES)" | ||
} | ||
} | ||
], | ||
"icons": [ | ||
{ | ||
"width": 23, | ||
"height": 23, | ||
"path": "icon/panel.png", | ||
"scale": [ | ||
1, | ||
2 | ||
], | ||
"theme": [ | ||
"all" | ||
], | ||
"species": [ | ||
"chrome" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "panel", | ||
"id": "toolbar", | ||
"label": { | ||
"default": "toolbar Auto-Photoshop-SD", | ||
"en-US": "toolbar Auto-Photoshop-SD", | ||
"es-ES": "toolbar Auto-Photoshop-SD" | ||
}, | ||
"minimumSize": { | ||
"width": 30, | ||
"height": 100 | ||
}, | ||
"maximumSize": { | ||
"width": 1200, | ||
"height": 10000 | ||
}, | ||
"preferredDockedSize": { | ||
"width": 30, | ||
"height": 800 | ||
}, | ||
"preferredFloatingSize": { | ||
"width": 30, | ||
"height": 800 | ||
}, | ||
"commands": [ | ||
{ | ||
"id": "show_alert", | ||
"label": { | ||
"default": "Show Alert", | ||
"en-US": "Show Alert (US)", | ||
"es-ES": "Show Alert (ES)" | ||
} | ||
} | ||
], | ||
"icons": [ | ||
{ | ||
"width": 23, | ||
"height": 23, | ||
"path": "icon/panel.png", | ||
"scale": [ | ||
1, | ||
2 | ||
], | ||
"theme": [ | ||
"all" | ||
], | ||
"species": [ | ||
"chrome" | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"icons": [ | ||
{ | ||
"width": 48, | ||
"height": 48, | ||
"path": "icon/plugin.png", | ||
"scale": [ | ||
1, | ||
2 | ||
], | ||
"theme": [ | ||
"all" | ||
], | ||
"species": [ | ||
"pluginList" | ||
] | ||
} | ||
] | ||
} | ||
{"id":"auto.photoshop.stable.diffusion.plugin","name":"Auto Photoshop Stable Diffusion Plugin","version":"1.3.2","host":{"app":"PS","minVersion":"24.0.0"},"main":"index.html","manifestVersion":5,"requiredPermissions":{"network":{"domains":"all"},"launchProcess":{"schemes":["http","https","mailto"],"extensions":[".png",".jpg",".pdf",""]},"clipboard":"readAndWrite","localFileSystem":"request","ipc":{"enablePluginCommunication":true}},"entrypoints":[{"type":"panel","id":"main_panel","label":{"default":"Auto-Photoshop-SD","en-US":"Auto-Photoshop-SD","es-ES":"Auto-Photoshop-SD","zh-CN":"SD插件(明空汉化)"},"minimumSize":{"width":400,"height":800},"maximumSize":{"width":1200,"height":10000},"preferredDockedSize":{"width":150,"height":800},"preferredFloatingSize":{"width":300,"height":800},"commands":[{"id":"show_alert","label":{"default":"Show Alert","en-US":"Show Alert (US)","es-ES":"Show Alert (ES)"}}],"icons":[{"width":23,"height":23,"path":"icon/panel.png","scale":[1,2],"theme":["all"],"species":["chrome"]}]},{"type":"panel","id":"second_panel","label":{"default":"Second Auto-Photoshop-SD","en-US":"Second Auto-Photoshop-SD","es-ES":"Second Auto-Photoshop-SD","zh-CN":"SD插件(明空汉化)"},"minimumSize":{"width":100,"height":100},"maximumSize":{"width":1200,"height":10000},"preferredDockedSize":{"width":150,"height":800},"preferredFloatingSize":{"width":300,"height":800},"commands":[{"id":"show_alert","label":{"default":"Show Alert","en-US":"Show Alert (US)","es-ES":"Show Alert (ES)"}}],"icons":[{"width":23,"height":23,"path":"icon/panel.png","scale":[1,2],"theme":["all"],"species":["chrome"]}]},{"type":"panel","id":"toolbar","label":{"default":"toolbar Auto-Photoshop-SD","en-US":"toolbar Auto-Photoshop-SD","es-ES":"toolbar Auto-Photoshop-SD"},"minimumSize":{"width":30,"height":100},"maximumSize":{"width":1200,"height":10000},"preferredDockedSize":{"width":30,"height":800},"preferredFloatingSize":{"width":30,"height":800},"commands":[{"id":"show_alert","label":{"default":"Show Alert","en-US":"Show Alert (US)","es-ES":"Show Alert (ES)"}}],"icons":[{"width":23,"height":23,"path":"icon/panel.png","scale":[1,2],"theme":["all"],"species":["chrome"]}]}],"icons":[{"width":48,"height":48,"path":"icon/plugin.png","scale":[1,2],"theme":["all"],"species":["pluginList"]}]} |
Oops, something went wrong.