Skip to content

Commit 9de926c

Browse files
committed
update publish
1 parent 249e2a3 commit 9de926c

File tree

2 files changed

+30
-25
lines changed

2 files changed

+30
-25
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,14 @@ jobs:
7070
with:
7171
name: ${{ steps.vars.outputs.PKG_BASENAME }}
7272
path: ${{ steps.vars.outputs.PKG_NAME }}
73+
74+
- name: Publish release assets
75+
uses: softprops/action-gh-release@v1
76+
if: startsWith(github.ref, 'refs/tags/')
77+
with:
78+
generate_release_notes: true
79+
files: |
80+
${{ steps.vars.outputs.PKG_NAME }}
81+
82+
- name: Publish VSCode market
83+
run: vsce publish -i ${{ steps.vars.outputs.PKG_NAME }} -t ${{ matrix.platform }} -p ${{ secrets.VSCE_TOKEN }}

publish.lua

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ print('复制 readme ...')
133133
fs.copy_file(ROOT / 'server' / 'changelog.md', ROOT / 'changelog.md', fs.copy_options.overwrite_existing)
134134
fsu.saveFile(ROOT / 'README.md', fsu.loadFile(ROOT / 'server' / 'README.md'):gsub('%!%[build%][^\r\n]*', ''))
135135

136-
local out = createDirectory(version)
136+
local out = createDirectory('test')
137137
print('输出目录为:', out)
138138
print('清理目录...')
139139
removeFiles(out)(true)
@@ -143,9 +143,7 @@ local count = copyFiles(ROOT , out) {
143143
['client'] = {
144144
['node_modules'] = true,
145145
['out'] = true,
146-
['package-lock.json'] = true,
147146
['package.json'] = true,
148-
['tsconfig.json'] = true,
149147
['3rd'] = {
150148
['vscode-lua-doc'] = {
151149
['doc'] = true,
@@ -155,11 +153,9 @@ local count = copyFiles(ROOT , out) {
155153
},
156154
['server'] = {
157155
['bin'] = true,
158-
['libs'] = true,
159156
['locale'] = true,
160157
['script'] = true,
161158
['main.lua'] = true,
162-
['platform.lua'] = true,
163159
['test'] = true,
164160
['test.lua'] = true,
165161
['debugger.lua'] = true,
@@ -173,11 +169,9 @@ local count = copyFiles(ROOT , out) {
173169
['logo.png'] = true,
174170
},
175171
['syntaxes'] = true,
176-
['package-lock.json'] = true,
177172
['package.json'] = true,
178173
['README.md'] = true,
179174
['changelog.md'] = true,
180-
['tsconfig.json'] = true,
181175
['package.nls.json'] = true,
182176
['package.nls.zh-cn.json'] = true,
183177
}
@@ -225,13 +219,13 @@ local function shell(command)
225219
print(p.stderr:read 'a')
226220
end
227221

228-
local vsix = ROOT / 'publish' / ('lua-' .. version .. '.vsix')
222+
--local vsix = ROOT / 'publish' / ('lua-' .. version .. '.vsix')
229223

230-
shell {
231-
'vsce', 'package',
232-
'-o', vsix,
233-
cwd = out,
234-
}
224+
--shell {
225+
-- 'vsce', 'package',
226+
-- '-o', vsix,
227+
-- cwd = out,
228+
--}
235229

236230
shell {
237231
'git', 'add', '*',
@@ -253,18 +247,18 @@ shell {
253247
'git', 'push', '--tags',
254248
}
255249

256-
shell {
257-
'vsce', 'publish',
258-
cwd = out,
259-
}
250+
--shell {
251+
-- 'vsce', 'publish',
252+
-- cwd = out,
253+
--}
260254

261-
local ovsxToken = fsu.loadFile(ROOT / 'ovsx-token')
262-
if ovsxToken then
263-
ovsxToken = ovsxToken:match '[%w%-]+'
264-
shell {
265-
'npx', 'ovsx', 'publish', vsix,
266-
'-p', ovsxToken
267-
}
268-
end
255+
--local ovsxToken = fsu.loadFile(ROOT / 'ovsx-token')
256+
--if ovsxToken then
257+
-- ovsxToken = ovsxToken:match '[%w%-]+'
258+
-- shell {
259+
-- 'npx', 'ovsx', 'publish', vsix,
260+
-- '-p', ovsxToken
261+
-- }
262+
--end
269263

270264
print('完成')

0 commit comments

Comments
 (0)