Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
vscode-lua-srb2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LJ Sonic
vscode-lua-srb2
Commits
9de926ca
Commit
9de926ca
authored
3 years ago
by
最萌小汐
Browse files
Options
Downloads
Patches
Plain Diff
update publish
parent
249e2a3c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/build.yml
+11
-0
11 additions, 0 deletions
.github/workflows/build.yml
publish.lua
+19
-25
19 additions, 25 deletions
publish.lua
with
30 additions
and
25 deletions
.github/workflows/build.yml
+
11
−
0
View file @
9de926ca
...
@@ -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 }}
This diff is collapsed.
Click to expand it.
publish.lua
+
19
−
25
View file @
9de926ca
...
@@ -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
(
'完成'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment