Skip to content
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
18 changes: 15 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ name: Publish Extension

on:
workflow_run:
workflows: ["Test and Build VSCode"]
workflows: ["Publish VSCode"]
types:
- completed

jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64, arm64] # Define the architectures
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -18,9 +21,16 @@ jobs:
with:
node-version: '18'

# Install npm dependencies based on the architecture
- name: Install dependencies
run: npm install
run: |
if [ "${{ matrix.arch }}" == "arm64" ]; then
npm_config_arch=arm64 npm install --build-from-source
else
npm_config_arch=x64 npm install --build-from-source
fi

# Run Rollup for compilation
- name: Run Rollup
run: npm run rollupci

Expand All @@ -31,5 +41,7 @@ jobs:
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
target: |
${{ matrix.arch == 'arm64' && 'linux-arm64,darwin-arm64,win32-arm64' || 'linux-x64,darwin-x64,win32-x64' }}
registryUrl: https://marketplace.visualstudio.com
skipDuplicate: true
skipDuplicate: true
62 changes: 62 additions & 0 deletions .github/workflows/testarch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Node.js Build

on:
pull_request:
branches:
- main

jobs:
package:
name: Package
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64, arm64] # Define the architectures
steps:
- uses: actions/checkout@v3

# Set up Node.js environment for the appropriate Node.js version
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x

# Install npm dependencies based on the architecture
- name: Install dependencies
run: |
if [ "${{ matrix.arch }}" == "arm64" ]; then
npm_config_arch=arm64 npm install --build-from-source
else
npm_config_arch=x64 npm install --build-from-source
fi

# Run Rollup for compilation (adjust this as necessary for your project)
- name: Run Rollup
run: npm run rollupci

# List contents of the compiled directory for debugging
- name: List contents of out/compiled directory
run: ls -R out/compiled

# Install vsce for packaging the extension
- name: Install vsce
run: npm install -g @vscode/vsce

# Set up the package path using environment variables
- name: Setup package path
id: setup
run: |
packageName=$(node -e "console.log(require('./package.json').name + '-' + require('./package.json').version + '-${{ matrix.arch }}.vsix')")
echo "PACKAGE_NAME=$packageName" >> $GITHUB_ENV

# Package the extension with dynamic targets based on architecture
- name: Package Extension
run: |
vsce package --target ${{ matrix.arch == 'arm64' && 'linux-arm64 --target darwin-arm64 --target win32-arm64' || 'linux-x64 --target darwin-x64 --target win32-x64' }} --out out/compiled/extension-${{ matrix.arch }}.vsix

# List the generated VSIX file for debugging purposes
- name: List packaged VSIX
run: ls -lh $VSIX_PACKAGE_PATH

- run: xvfb-run -a npm test
if: runner.os == 'Linux'
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ First Release for Vs Code Extension.
## [1.0.12]

- Fixing wrong file test generation in express mongoose

## [1.0.13]

- Separate release for arm and amd user
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "keployio",
"displayName": "Keploy",
"description": "Streamline testing with the power of Keploy, directly in your favorite IDE.",
"version": "1.0.12",
"version": "1.0.13",
"publisher": "Keploy",
"icon": "media/logo.png",
"pricing": "Free",
Expand Down