Skip to content
Snippets Groups Projects
Commit 9de926ca authored by 最萌小汐's avatar 最萌小汐
Browse files

update publish

parent 249e2a3c
Branches
Tags
No related merge requests found
...@@ -70,3 +70,14 @@ jobs: ...@@ -70,3 +70,14 @@ jobs:
with: with:
name: ${{ steps.vars.outputs.PKG_BASENAME }} name: ${{ steps.vars.outputs.PKG_BASENAME }}
path: ${{ steps.vars.outputs.PKG_NAME }} path: ${{ steps.vars.outputs.PKG_NAME }}
- name: Publish release assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: |
${{ steps.vars.outputs.PKG_NAME }}
- name: Publish VSCode market
run: vsce publish -i ${{ steps.vars.outputs.PKG_NAME }} -t ${{ matrix.platform }} -p ${{ secrets.VSCE_TOKEN }}
...@@ -133,7 +133,7 @@ print('复制 readme ...') ...@@ -133,7 +133,7 @@ print('复制 readme ...')
fs.copy_file(ROOT / 'server' / 'changelog.md', ROOT / 'changelog.md', fs.copy_options.overwrite_existing) fs.copy_file(ROOT / 'server' / 'changelog.md', ROOT / 'changelog.md', fs.copy_options.overwrite_existing)
fsu.saveFile(ROOT / 'README.md', fsu.loadFile(ROOT / 'server' / 'README.md'):gsub('%!%[build%][^\r\n]*', '')) fsu.saveFile(ROOT / 'README.md', fsu.loadFile(ROOT / 'server' / 'README.md'):gsub('%!%[build%][^\r\n]*', ''))
local out = createDirectory(version) local out = createDirectory('test')
print('输出目录为:', out) print('输出目录为:', out)
print('清理目录...') print('清理目录...')
removeFiles(out)(true) removeFiles(out)(true)
...@@ -143,9 +143,7 @@ local count = copyFiles(ROOT , out) { ...@@ -143,9 +143,7 @@ local count = copyFiles(ROOT , out) {
['client'] = { ['client'] = {
['node_modules'] = true, ['node_modules'] = true,
['out'] = true, ['out'] = true,
['package-lock.json'] = true,
['package.json'] = true, ['package.json'] = true,
['tsconfig.json'] = true,
['3rd'] = { ['3rd'] = {
['vscode-lua-doc'] = { ['vscode-lua-doc'] = {
['doc'] = true, ['doc'] = true,
...@@ -155,11 +153,9 @@ local count = copyFiles(ROOT , out) { ...@@ -155,11 +153,9 @@ local count = copyFiles(ROOT , out) {
}, },
['server'] = { ['server'] = {
['bin'] = true, ['bin'] = true,
['libs'] = true,
['locale'] = true, ['locale'] = true,
['script'] = true, ['script'] = true,
['main.lua'] = true, ['main.lua'] = true,
['platform.lua'] = true,
['test'] = true, ['test'] = true,
['test.lua'] = true, ['test.lua'] = true,
['debugger.lua'] = true, ['debugger.lua'] = true,
...@@ -173,11 +169,9 @@ local count = copyFiles(ROOT , out) { ...@@ -173,11 +169,9 @@ local count = copyFiles(ROOT , out) {
['logo.png'] = true, ['logo.png'] = true,
}, },
['syntaxes'] = true, ['syntaxes'] = true,
['package-lock.json'] = true,
['package.json'] = true, ['package.json'] = true,
['README.md'] = true, ['README.md'] = true,
['changelog.md'] = true, ['changelog.md'] = true,
['tsconfig.json'] = true,
['package.nls.json'] = true, ['package.nls.json'] = true,
['package.nls.zh-cn.json'] = true, ['package.nls.zh-cn.json'] = true,
} }
...@@ -225,13 +219,13 @@ local function shell(command) ...@@ -225,13 +219,13 @@ local function shell(command)
print(p.stderr:read 'a') print(p.stderr:read 'a')
end end
local vsix = ROOT / 'publish' / ('lua-' .. version .. '.vsix') --local vsix = ROOT / 'publish' / ('lua-' .. version .. '.vsix')
shell { --shell {
'vsce', 'package', -- 'vsce', 'package',
'-o', vsix, -- '-o', vsix,
cwd = out, -- cwd = out,
} --}
shell { shell {
'git', 'add', '*', 'git', 'add', '*',
...@@ -253,18 +247,18 @@ shell { ...@@ -253,18 +247,18 @@ shell {
'git', 'push', '--tags', 'git', 'push', '--tags',
} }
shell { --shell {
'vsce', 'publish', -- 'vsce', 'publish',
cwd = out, -- cwd = out,
} --}
local ovsxToken = fsu.loadFile(ROOT / 'ovsx-token') --local ovsxToken = fsu.loadFile(ROOT / 'ovsx-token')
if ovsxToken then --if ovsxToken then
ovsxToken = ovsxToken:match '[%w%-]+' -- ovsxToken = ovsxToken:match '[%w%-]+'
shell { -- shell {
'npx', 'ovsx', 'publish', vsix, -- 'npx', 'ovsx', 'publish', vsix,
'-p', ovsxToken -- '-p', ovsxToken
} -- }
end --end
print('完成') print('完成')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment