Skip to content

Commit 5ab6e77

Browse files
hyangahgopherbot
authored andcommitted
.github/workflows: adjust release nightly to use npx vsce
We can use the installed vsce instead of the third-party action. We also adjust the nightly workflow to package vsix in clean state before running any tests. That will reduce the chance of including unwanted files generated during tests. Updates #2676 Change-Id: I246cd1bf99bc51e23575ef16630e8eead04b11e2 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/470195 Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Suzy Mueller <[email protected]> (cherry picked from commit 179f226) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/470637 Run-TryBot: Suzy Mueller <[email protected]> Auto-Submit: Suzy Mueller <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
1 parent 170d3dc commit 5ab6e77

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.github/workflows/release-nightly.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ jobs:
3939
- name: Prepare Release
4040
run: build/all.bash prepare_nightly
4141

42+
- name: Version
43+
run: |
44+
echo "VSCODE_GO_VERSION=$(jq .version package.json | tr -d '"')" >> $GITHUB_ENV
45+
46+
- name: Package Extension
47+
run: npx vsce package -o "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix"
48+
4249
- name: Compile
4350
run: npm run vscode:prepublish
4451

@@ -62,8 +69,7 @@ jobs:
6269

6370
- name: Publish
6471
if: github.ref == 'refs/heads/master' && github.repository == 'golang/vscode-go'
65-
uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075
66-
with:
67-
args: "publish -p $VSCE_TOKEN"
68-
env:
69-
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
72+
run: |
73+
echo "publishing ${{ env.VSCODE_GO_VERSION }}"
74+
ls *.vsix
75+
npx vsce publish -i "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}"

.github/workflows/release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ jobs:
108108

109109
- name: publish
110110
if: env.EXT_ISPREVIEW != 1 && github.repository == 'golang/vscode-go'
111-
uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075
112-
with:
113-
args: "publish -p $VSCE_TOKEN"
114-
env:
115-
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
111+
run: npx vsce publish -i "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}"
116112

117113
# TODO: check if the commit is in green state. (test-long.yml results)

0 commit comments

Comments
 (0)