Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: release action for vscode #20

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading