Skip to content

Commit

Permalink
.github/workflows: adjust release nightly to use npx vsce
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
hyangah authored and gopherbot committed Feb 23, 2023
1 parent 170d3dc commit 5ab6e77
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ jobs:
- name: Prepare Release
run: build/all.bash prepare_nightly

- name: Version
run: |
echo "VSCODE_GO_VERSION=$(jq .version package.json | tr -d '"')" >> $GITHUB_ENV
- name: Package Extension
run: npx vsce package -o "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix"

- name: Compile
run: npm run vscode:prepublish

Expand All @@ -62,8 +69,7 @@ jobs:

- name: Publish
if: github.ref == 'refs/heads/master' && github.repository == 'golang/vscode-go'
uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075
with:
args: "publish -p $VSCE_TOKEN"
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
run: |
echo "publishing ${{ env.VSCODE_GO_VERSION }}"
ls *.vsix
npx vsce publish -i "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}"
6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ jobs:

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

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

0 comments on commit 5ab6e77

Please sign in to comment.