Skip to content

Commit

Permalink
fix: release action for vscode (#20)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Shyngle <[email protected]>
  • Loading branch information
Sarthak160 authored Aug 23, 2024
1 parent 0fc3768 commit ecf7ba0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
tag: ${{ steps.setup-tag.outputs.tag }}
version: ${{ steps.setup-tag.outputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ steps.node_version.outputs.nvmrc }}

Expand All @@ -34,35 +34,34 @@ jobs:

- name: Setup package path
id: setup
run: echo "::set-output name=packageName::$(node -e "console.log(require('./package.json').name + '-' + require('./package.json').version + '.vsix')")"
run: echo "packageName=$(node -e \"console.log(require('./package.json').name + '-' + require('./package.json').version + '.vsix')\")" >> $GITHUB_OUTPUT

- name: Package
env:
VSIX_PACKAGE_PATH: ${{ steps.setup.outputs.packageName }}
run: vsce package
- uses: actions/upload-artifact@v2

- uses: actions/upload-artifact@v3
with:
name: ${{ steps.setup.outputs.packageName }}
path: ${{ steps.setup.outputs.packageName }}

- name: Setup tag
id: setup-tag
run: |
version=$(node -p "require('./package.json').version")
majorVersion=$(echo $version | cut -d '.' -f 1)
echo "tag: release/$majorVersion"
echo "::set-output name=tag::release/$majorVersion"
echo "::set-output name=version::$version"
echo "tag=release/$majorVersion" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
shell: bash

publishGH:
name: Publish to GitHub releases
runs-on: ubuntu-latest
needs: package
if: startsWith(needs.package.outputs.tag, 'release/') && needs.package.outputs.tag != github.ref
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: ${{ needs.package.outputs.packageName }}

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"rollup": "rollup -c -w --bundleConfigAsCjs",
"rollupci": "rollup -c --bundleConfigAsCjs",
"watch": "tsc -watch -p ./",
"debug": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
Expand Down
4 changes: 2 additions & 2 deletions webviews/components/UtgDocs.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script>
const vscode = acquireVsCodeApi();
let screenshot1 =
"https://raw.githubusercontent.com/Sarthak160/goApi/main/Frame%209.png";
"https://github.com/Sarthak160/goApi/blob/main/codeLens.png?raw=true";
let screenshot2 =
"https://github.com/Sarthak160/goApi/blob/main/Group%207.png?raw=true";
"https://github.com/Sarthak160/goApi/blob/main/command.png?raw=true";
Expand Down

0 comments on commit ecf7ba0

Please sign in to comment.