Skip to content

Commit

Permalink
Fix: Update GitHub Actions workflow with correct environment variable…
Browse files Browse the repository at this point in the history
…s and artifact upload paths (#38)
  • Loading branch information
Karthick-Elumalai authored Jan 30, 2025
1 parent 4e41a7c commit 6815d85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,25 @@ jobs:
if: steps.webview-cache.outputs.cache-hit != 'true'
run: cd webview-ui && npm ci

- name: Build Extension
run: npm run build

- name: Build package
run: |
echo "PACKAGE_NAME=$(node -p "require('./package.json').name || 'hai-build-code-generator'")" >> $GITHUB_ENV
echo "BUILD_VERSION=$(node -p "require('./package.json').version || '0.0.0'")" >> $GITHUB_ENV
# Set the package name and version from package.json or use default values
PACKAGE_NAME="$(node -p "require('./package.json').name || 'hai-build-code-generator'")"
BUILD_VERSION="$(node -p "require('./package.json').version || '0.0.0'")"
# Save the environment variables to GitHub Actions environment
echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_ENV
echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_ENV
# Build the VSIX package
echo "Output Package Name: $PACKAGE_NAME-$BUILD_VERSION.vsix"
npx @vscode/vsce package --out "$PACKAGE_NAME-$BUILD_VERSION.vsix"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: vsix-package
path: ${{ github.workspace }}/${{ env.PACKAGE_NAME }}-${{ env.BUILD_VERSION }}.vsix
name: "${{ env.PACKAGE_NAME }}-${{ env.BUILD_VERSION }}"
path: "${{ env.PACKAGE_NAME }}-${{ env.BUILD_VERSION }}.vsix"
retention-days: 90

- name: Notify release
Expand Down Expand Up @@ -134,7 +139,7 @@ jobs:
},
{
\"type\": \"TextBlock\",
\"text\": \"Release - v${{ needs.initialize.outputs.package_name }}:${{ needs.initialize.outputs.build_version }}\",
\"text\": \"Release - v${{ env.BUILD_VERSION }}\",
\"weight\": \"Bolder\",
\"size\": \"Medium\"
},
Expand All @@ -143,11 +148,6 @@ jobs:
\"text\": \"🎉 The latest release is now available!\",
\"wrap\": true
},
{
\"type\": \"TextBlock\",
\"text\": \"Download the artifact from: $ARTIFACT_URL\",
\"wrap\": true
},
{
\"type\": \"Image\",
\"url\": \"$RANDOM_GIF\",
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ jobs:
if: steps.webview-cache.outputs.cache-hit != 'true'
run: cd webview-ui && npm ci

- name: Build Extension
run: npm run build

- name: Install Publishing Tools
run: npm install -g vsce

Expand Down

0 comments on commit 6815d85

Please sign in to comment.