From e61745992a8379b5e40baa974c98d222749bc311 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Fri, 27 Sep 2024 12:06:58 -0400 Subject: [PATCH 01/29] adding intial release workflow Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 80 +++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4cba03a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,80 @@ +name: Release + +on: + push: + branches: + - "main" + - "release-*" + + pull_request: + branches: + - "main" + - "release-*" + + workflow_dispatch: + inputs: + release_branch: + description: 'Branch to release (e.g., main, release-1.0)' + default: 'main' + architectures: + description: 'Arch to build' + default: 'linux, macos, windows' + run_tests: + description: 'Run tests before packaging and releasing' + default: 'true' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + arch: linux + max-parallel: 1 + if: ${{ contains( toLower( github.event.inputs.architectures ), matrix.arch ) || github.event_name != 'workflow_dispatch' }} + steps: + - name: checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.branch || github.ref }} + + - name: Use Node.js from .nvmrc + uses: actions/setup-node@v4 + with: + node-version-file: "vscode/.nvmrc" + + - name: Cache extension node_modules + uses: actions/cache@v3 + with: + path: vscode/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }} + + - name: Install dependencies + run: | + cd vscode + npm version + npm ci + + - name: Lint sources + run: | + cd vscode + npm run lint + + - name: Build + run: | + cd vscode + npm run package + + - name: Generate .vsix package + run: | + npm install -g @vscode/vsce + cd vscode + vsce package + + - name: Upload VSIX artifact + uses: actions/upload-artifact@v4 + with: + name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} + path: "*.vsix" + \ No newline at end of file From d818cd96e069090eac1ee96bf22aa22e7b945794 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Fri, 27 Sep 2024 12:17:34 -0400 Subject: [PATCH 02/29] fix errors Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cba03a..141c9e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: - os: ubuntu-latest arch: linux max-parallel: 1 - if: ${{ contains( toLower( github.event.inputs.architectures ), matrix.arch ) || github.event_name != 'workflow_dispatch' }} + if: ${{ contains (github.event.inputs.architectures, matrix.arch ) || github.event_name != 'workflow_dispatch' }} steps: - name: checkout code uses: actions/checkout@v4 From 978688d883bd60722c99e8259c9b85c8da7dc3eb Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Fri, 27 Sep 2024 12:21:10 -0400 Subject: [PATCH 03/29] trial 1 Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 141c9e3..7e7be7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: - os: ubuntu-latest arch: linux max-parallel: 1 - if: ${{ contains (github.event.inputs.architectures, matrix.arch ) || github.event_name != 'workflow_dispatch' }} + steps: - name: checkout code uses: actions/checkout@v4 From 63fca97e3658ef6f60642a12287b9fb1730916fa Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan <6026527+savitharaghunathan@users.noreply.github.com> Date: Fri, 27 Sep 2024 12:21:50 -0400 Subject: [PATCH 04/29] Revert ":sparkles: adding initial release workflow" --- .github/workflows/release.yml | 80 ----------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 4cba03a..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Release - -on: - push: - branches: - - "main" - - "release-*" - - pull_request: - branches: - - "main" - - "release-*" - - workflow_dispatch: - inputs: - release_branch: - description: 'Branch to release (e.g., main, release-1.0)' - default: 'main' - architectures: - description: 'Arch to build' - default: 'linux, macos, windows' - run_tests: - description: 'Run tests before packaging and releasing' - default: 'true' - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-latest - arch: linux - max-parallel: 1 - if: ${{ contains( toLower( github.event.inputs.architectures ), matrix.arch ) || github.event_name != 'workflow_dispatch' }} - steps: - - name: checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.branch || github.ref }} - - - name: Use Node.js from .nvmrc - uses: actions/setup-node@v4 - with: - node-version-file: "vscode/.nvmrc" - - - name: Cache extension node_modules - uses: actions/cache@v3 - with: - path: vscode/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }} - - - name: Install dependencies - run: | - cd vscode - npm version - npm ci - - - name: Lint sources - run: | - cd vscode - npm run lint - - - name: Build - run: | - cd vscode - npm run package - - - name: Generate .vsix package - run: | - npm install -g @vscode/vsce - cd vscode - vsce package - - - name: Upload VSIX artifact - uses: actions/upload-artifact@v4 - with: - name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} - path: "*.vsix" - \ No newline at end of file From b1a30bb7583250bb2f475b4343eb8be12599d095 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Fri, 27 Sep 2024 13:42:43 -0400 Subject: [PATCH 05/29] update readme Signed-off-by: Savitha Raghunathan --- vscode/README.md | 70 +----------------------------------------------- 1 file changed, 1 insertion(+), 69 deletions(-) diff --git a/vscode/README.md b/vscode/README.md index 4f5c16a..fd477ef 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -1,71 +1,3 @@ # konveyor-vscode README -This is the README for your extension "konveyor-vscode". After writing up a brief description, we recommend including the following sections. - -## Features - -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. - -For example if there is an image subfolder under your extension project workspace: - -\!\[feature X\]\(images/feature-x.png\) - -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. - -## Requirements - -If you have any requirements or dependencies, add a section describing those and how to install and configure them. - -## Extension Settings - -Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. - -For example: - -This extension contributes the following settings: - -* `myExtension.enable`: Enable/disable this extension. -* `myExtension.thing`: Set to `blah` to do something. - -## Known Issues - -Calling out known issues can help limit users opening duplicate issues against your extension. - -## Release Notes - -Users appreciate release notes as you update your extension. - -### 1.0.0 - -Initial release of ... - -### 1.0.1 - -Fixed issue #. - -### 1.1.0 - -Added features X, Y, and Z. - ---- - -## Following extension guidelines - -Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension. - -* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines) - -## Working with Markdown - -You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: - -* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux). -* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux). -* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets. - -## For more information - -* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) -* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) - -**Enjoy!** +TODO: Readme \ No newline at end of file From d35087a46217a86dec53cbffda54f730d2254f06 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Fri, 27 Sep 2024 14:02:30 -0400 Subject: [PATCH 06/29] generate vsix fix Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e7be7d..912b80c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,7 +69,6 @@ jobs: - name: Generate .vsix package run: | npm install -g @vscode/vsce - cd vscode vsce package - name: Upload VSIX artifact From 08d023976b4c2b8e33ef3503ac93fc4637aaaddc Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 10:44:16 -0400 Subject: [PATCH 07/29] updating .vscodeignore file Signed-off-by: Savitha Raghunathan --- vscode/.vscodeignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/.vscodeignore b/vscode/.vscodeignore index d255964..1943362 100644 --- a/vscode/.vscodeignore +++ b/vscode/.vscodeignore @@ -1,6 +1,5 @@ .vscode/** .vscode-test/** -out/** node_modules/** src/** .gitignore @@ -12,3 +11,4 @@ vsc-extension-quickstart.md **/*.map **/*.ts **/.vscode-test.* +test_out/* From 45b103c6db942b2ff31257a8bb83dc58d2b3e5d4 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 11:12:51 -0400 Subject: [PATCH 08/29] updating the way vsce package runs Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 912b80c..792bff0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ on: default: 'main' architectures: description: 'Arch to build' - default: 'linux, macos, windows' + default: 'linux,macos,windows' run_tests: description: 'Run tests before packaging and releasing' default: 'true' @@ -51,29 +51,28 @@ jobs: key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }} - name: Install dependencies + working-directory: ./vscode run: | - cd vscode - npm version npm ci - name: Lint sources + working-directory: ./vscode run: | - cd vscode npm run lint - name: Build + working-directory: ./vscode run: | - cd vscode npm run package - name: Generate .vsix package + working-directory: ./vscode run: | - npm install -g @vscode/vsce - vsce package + npm install @vscode/vsce + npx vsce package - name: Upload VSIX artifact uses: actions/upload-artifact@v4 with: name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} - path: "*.vsix" - \ No newline at end of file + path: "vscode/*.vsix" \ No newline at end of file From f34b8f5c67ba30798a36cbf4f4a9033a3ff69bd7 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 11:21:05 -0400 Subject: [PATCH 09/29] adding readme back Signed-off-by: Savitha Raghunathan --- vscode/README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/vscode/README.md b/vscode/README.md index fd477ef..37cd24d 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -1,3 +1,71 @@ # konveyor-vscode README -TODO: Readme \ No newline at end of file +This is the README for your extension "konveyor-vscode". After writing up a brief description, we recommend including the following sections. + +## Features + +Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. + +For example if there is an image subfolder under your extension project workspace: + +\!\[feature X\]\(images/feature-x.png\) + +> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. + +## Requirements + +If you have any requirements or dependencies, add a section describing those and how to install and configure them. + +## Extension Settings + +Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. + +For example: + +This extension contributes the following settings: + +* `myExtension.enable`: Enable/disable this extension. +* `myExtension.thing`: Set to `blah` to do something. + +## Known Issues + +Calling out known issues can help limit users opening duplicate issues against your extension. + +## Release Notes + +Users appreciate release notes as you update your extension. + +### 1.0.0 + +Initial release of ... + +### 1.0.1 + +Fixed issue #. + +### 1.1.0 + +Added features X, Y, and Z. + +--- + +## Following extension guidelines + +Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension. + +* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines) + +## Working with Markdown + +You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: + +* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux). +* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux). +* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets. + +## For more information + +* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) +* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) + +**Enjoy!** \ No newline at end of file From 72b89ff974ad517b617b67c0d0138afd59feec86 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 11:25:57 -0400 Subject: [PATCH 10/29] updating readme to avoid the vsce package error Signed-off-by: Savitha Raghunathan --- vscode/README.md | 62 +++++------------------------------------------- 1 file changed, 6 insertions(+), 56 deletions(-) diff --git a/vscode/README.md b/vscode/README.md index 37cd24d..a1b2afb 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -1,31 +1,16 @@ -# konveyor-vscode README +# konveyor-vscode -This is the README for your extension "konveyor-vscode". After writing up a brief description, we recommend including the following sections. +konveyor-vscode is a Konveyor AI plugin extension that is supported on VSCode ## Features - -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. - -For example if there is an image subfolder under your extension project workspace: - -\!\[feature X\]\(images/feature-x.png\) - -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. + ## Requirements - -If you have any requirements or dependencies, add a section describing those and how to install and configure them. + ## Extension Settings -Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. - -For example: - -This extension contributes the following settings: - -* `myExtension.enable`: Enable/disable this extension. -* `myExtension.thing`: Set to `blah` to do something. + ## Known Issues @@ -33,39 +18,4 @@ Calling out known issues can help limit users opening duplicate issues against y ## Release Notes -Users appreciate release notes as you update your extension. - -### 1.0.0 - -Initial release of ... - -### 1.0.1 - -Fixed issue #. - -### 1.1.0 - -Added features X, Y, and Z. - ---- - -## Following extension guidelines - -Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension. - -* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines) - -## Working with Markdown - -You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: - -* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux). -* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux). -* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets. - -## For more information - -* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) -* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) - -**Enjoy!** \ No newline at end of file + From f6839564a90994b535d0f5000dda903b45850804 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 13:55:40 -0400 Subject: [PATCH 11/29] Integrating release workflow - initial build, test, package, and upload artifacts to the ci runs. Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 114 ++++++++++++++++++++++++++++++++++ vscode/.vscodeignore | 2 +- vscode/README.md | 60 ++---------------- 3 files changed, 121 insertions(+), 55 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..43d8eb4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,114 @@ +name: Release + +on: + push: + branches: + - "main" + - "release-*" + + pull_request: + branches: + - "main" + - "release-*" + + workflow_dispatch: + inputs: + release_branch: + description: 'Branch to release (e.g., main, release-1.0)' + default: 'main' + run_tests: + description: 'Run tests before packaging and releasing (true/false)' + default: 'true' + +jobs: + build: + name: Build and Release (${{ matrix.arch }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + arch: linux + - os: macos-latest + arch: macos + - os: windows-latest + arch: windows + max-parallel: 3 + + steps: + - name: Check if architecture is selected + id: check_arch + shell: bash + run: | + echo "Selected architectures: ${{ github.event.inputs.architectures }}" + if [[ "${{ github.event.inputs.architectures }}" == *"${{ matrix.arch }}"* ]]; then + echo "should_build=true" >> $GITHUB_OUTPUT + else + echo "should_build=false" >> $GITHUB_OUTPUT + fi + + - name: Skip job if architecture not selected + if: ${{ steps.check_arch.outputs.should_build == 'false' }} + run: | + echo "Skipping build for architecture ${{ matrix.arch }}" + exit 0 + + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.release_branch || github.ref }} + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version-file: "vscode/.nvmrc" + + - name: Install dependencies + working-directory: ./vscode + run: npm ci + + - name: Lint sources + working-directory: ./vscode + run: npm run lint + + - name: Build + working-directory: ./vscode + run: npm run package + + # Install Xvfb on Linux + - name: Install Xvfb (Linux) + if: ${{ runner.os == 'Linux' }} + run: sudo apt-get install -y xvfb + + # Run tests on Linux + - name: Run tests (Linux) + if: ${{ github.event.inputs.run_tests == 'true' && runner.os == 'Linux' }} + working-directory: ./vscode + run: xvfb-run npm test + shell: bash + + # Run tests on macOS + - name: Run tests (macOS) + if: ${{ github.event.inputs.run_tests == 'true' && runner.os == 'macOS' }} + working-directory: ./vscode + run: npm test + shell: bash + + # Run tests on Windows + - name: Run tests (Windows) + if: ${{ github.event.inputs.run_tests == 'true' && runner.os == 'Windows' }} + working-directory: ./vscode + run: npm test + shell: cmd + + - name: Generate .vsix package + working-directory: ./vscode + run: | + npm install @vscode/vsce + npx vsce package + + - name: Upload VSIX artifact + uses: actions/upload-artifact@v4 + with: + name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} + path: "vscode/*.vsix" \ No newline at end of file diff --git a/vscode/.vscodeignore b/vscode/.vscodeignore index d255964..966f169 100644 --- a/vscode/.vscodeignore +++ b/vscode/.vscodeignore @@ -1,6 +1,6 @@ .vscode/** .vscode-test/** -out/** +test_out/** node_modules/** src/** .gitignore diff --git a/vscode/README.md b/vscode/README.md index 4f5c16a..635e68f 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -1,71 +1,23 @@ # konveyor-vscode README -This is the README for your extension "konveyor-vscode". After writing up a brief description, we recommend including the following sections. +This extension allows the user to run Konveyor AI from VSCode. ## Features -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. - -For example if there is an image subfolder under your extension project workspace: - -\!\[feature X\]\(images/feature-x.png\) - -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. +TODO ## Requirements -If you have any requirements or dependencies, add a section describing those and how to install and configure them. +TODO ## Extension Settings -Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. - -For example: - -This extension contributes the following settings: - -* `myExtension.enable`: Enable/disable this extension. -* `myExtension.thing`: Set to `blah` to do something. +TODO ## Known Issues -Calling out known issues can help limit users opening duplicate issues against your extension. +TODO ## Release Notes -Users appreciate release notes as you update your extension. - -### 1.0.0 - -Initial release of ... - -### 1.0.1 - -Fixed issue #. - -### 1.1.0 - -Added features X, Y, and Z. - ---- - -## Following extension guidelines - -Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension. - -* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines) - -## Working with Markdown - -You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: - -* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux). -* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux). -* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets. - -## For more information - -* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) -* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) - -**Enjoy!** +TODO From 5f0bfac0769b59ceb641626663f6a53bd0715582 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 14:58:44 -0400 Subject: [PATCH 12/29] Add feedback from reviews Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 65 +++++++++++++---------------------- 1 file changed, 23 insertions(+), 42 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43d8eb4..05c4b8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,15 +11,6 @@ on: - "main" - "release-*" - workflow_dispatch: - inputs: - release_branch: - description: 'Branch to release (e.g., main, release-1.0)' - default: 'main' - run_tests: - description: 'Run tests before packaging and releasing (true/false)' - default: 'true' - jobs: build: name: Build and Release (${{ matrix.arch }}) @@ -36,27 +27,10 @@ jobs: max-parallel: 3 steps: - - name: Check if architecture is selected - id: check_arch - shell: bash - run: | - echo "Selected architectures: ${{ github.event.inputs.architectures }}" - if [[ "${{ github.event.inputs.architectures }}" == *"${{ matrix.arch }}"* ]]; then - echo "should_build=true" >> $GITHUB_OUTPUT - else - echo "should_build=false" >> $GITHUB_OUTPUT - fi - - - name: Skip job if architecture not selected - if: ${{ steps.check_arch.outputs.should_build == 'false' }} - run: | - echo "Skipping build for architecture ${{ matrix.arch }}" - exit 0 - - name: Checkout code uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.release_branch || github.ref }} + ref: ${{ github.ref }} - name: Set up Node.js uses: actions/setup-node@v4 @@ -75,31 +49,26 @@ jobs: working-directory: ./vscode run: npm run package - # Install Xvfb on Linux - - name: Install Xvfb (Linux) - if: ${{ runner.os == 'Linux' }} - run: sudo apt-get install -y xvfb - - # Run tests on Linux - - name: Run tests (Linux) - if: ${{ github.event.inputs.run_tests == 'true' && runner.os == 'Linux' }} + # Install Xvfb and Run tests on Linux + - name: Install Xvfb and Run tests (Linux) + if: matrix.arch == 'linux' working-directory: ./vscode - run: xvfb-run npm test - shell: bash + run: | + sudo apt-get install -y xvfb + xvfb-run npm test # Run tests on macOS - name: Run tests (macOS) - if: ${{ github.event.inputs.run_tests == 'true' && runner.os == 'macOS' }} + if: matrix.arch == 'macos' working-directory: ./vscode run: npm test - shell: bash # Run tests on Windows - name: Run tests (Windows) - if: ${{ github.event.inputs.run_tests == 'true' && runner.os == 'Windows' }} + if: matrix.arch == 'windows' working-directory: ./vscode - run: npm test shell: cmd + run: npm test - name: Generate .vsix package working-directory: ./vscode @@ -111,4 +80,16 @@ jobs: uses: actions/upload-artifact@v4 with: name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} - path: "vscode/*.vsix" \ No newline at end of file + path: "vscode/*.vsix" + + # Update latest release (only on Linux and for main branch) + - name: Update latest release + if: matrix.arch == 'linux' && github.ref == 'refs/heads/main' + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: true + title: "Development Build" + files: | + vscode/*.vsix From 1533cae64dd8b7eb428dd336dad09ca5d29b8181 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 15:26:33 -0400 Subject: [PATCH 13/29] testing alternative workflow Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abfeec1..bce2eab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,14 +83,12 @@ jobs: path: "vscode/*.vsix" # Update latest release (only on Linux and for main branch) - - name: Update latest release + - name: Create or Update Release if: matrix.arch == 'linux' && github.ref == 'refs/heads/main' - uses: marvinpinto/action-automatic-releases@latest + uses: softprops/action-gh-release@v1 with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" + files: "vscode/*.vsix" + tag_name: "latest" prerelease: true - title: "Development Build" - files: | - vscode/*.vsix - + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 8fe731744906330b628a7fb0da3295bc269c6124 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 15:38:44 -0400 Subject: [PATCH 14/29] overwrite latest releases Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bce2eab..234810a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,6 +89,9 @@ jobs: with: files: "vscode/*.vsix" tag_name: "latest" + target_commitish: ${{ github.sha }} + overwrite: true prerelease: true + name: "Development Build" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From a700bb9c9c3012f00afabfac6201dba4b6028999 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 15:59:52 -0400 Subject: [PATCH 15/29] try a new action Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 234810a..3399914 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,13 +85,14 @@ jobs: # Update latest release (only on Linux and for main branch) - name: Create or Update Release if: matrix.arch == 'linux' && github.ref == 'refs/heads/main' - uses: softprops/action-gh-release@v1 + uses: ncipollo/release-action@v1 with: - files: "vscode/*.vsix" - tag_name: "latest" - target_commitish: ${{ github.sha }} - overwrite: true + tag: latest + releaseName: "Development Build" + allowUpdates: true + replacesArtifacts: true + commit: ${{ github.sha }} + artifacts: "vscode/*.vsix" prerelease: true - name: "Development Build" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 571b43d504b0505ffd4447c9f1195da4c0824073 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 16:06:39 -0400 Subject: [PATCH 16/29] switching back to archived action Signed-off-by: Savitha Raghunathan --- .github/workflows/release.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3399914..552af83 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,16 +83,13 @@ jobs: path: "vscode/*.vsix" # Update latest release (only on Linux and for main branch) - - name: Create or Update Release - if: matrix.arch == 'linux' && github.ref == 'refs/heads/main' - uses: ncipollo/release-action@v1 + - name: Update latest release + if: runner.os == 'Linux' && github.ref == 'refs/heads/main' + uses: marvinpinto/action-automatic-releases@latest with: - tag: latest - releaseName: "Development Build" - allowUpdates: true - replacesArtifacts: true - commit: ${{ github.sha }} - artifacts: "vscode/*.vsix" + repo_token: "${{secrets.GITHUB_TOKEN}}" + automatic_release_tag: "latest" prerelease: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + title: "Development Build" + files: | + *.vsix From a6d58e9848de58aa32cabf55c401492239198de6 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Tue, 1 Oct 2024 13:06:13 -0400 Subject: [PATCH 17/29] reconciling release and ci workflow Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 97 ++++++++++++++++++++++------------- .github/workflows/release.yml | 95 ---------------------------------- 2 files changed, 61 insertions(+), 131 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index 69ecc59..306ec87 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -11,23 +11,32 @@ on: - "main" - "release-*" - workflow_dispatch: - - workflow_call: - concurrency: group: ci-repo-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true jobs: - package-tests: - runs-on: ubuntu-latest + build: + name: Build and Release (${{ matrix.arch }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + arch: linux + - os: macos-latest + arch: macos + - os: windows-latest + arch: windows + max-parallel: 3 steps: - - name: Check-out repository + - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} - - name: Use Node.js from .nvmrc + - name: Set up Node.js uses: actions/setup-node@v4 with: node-version-file: "vscode/.nvmrc" @@ -39,43 +48,59 @@ jobs: key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }} - name: Install dependencies + working-directory: ./vscode run: | - cd vscode npm version npm ci - name: Lint sources - run: | - cd vscode - npm run lint + working-directory: ./vscode + run: npm run lint - name: Build + working-directory: ./vscode + run: npm run package + + # Install Xvfb and Run tests on Linux + - name: Install Xvfb and Run tests (Linux) + if: matrix.arch == 'linux' + working-directory: ./vscode + run: + xvfb-run -a npm run test + + # Run tests on macOS + - name: Run tests (macOS) + if: matrix.arch == 'macos' + working-directory: ./vscode + run: npm test + + # Run tests on Windows + - name: Run tests (Windows) + if: matrix.arch == 'windows' + working-directory: ./vscode + shell: cmd + run: npm test + + - name: Generate .vsix package + working-directory: ./vscode run: | - cd vscode - npm run package - - vscode-tests: - runs-on: ubuntu-latest - - steps: - - name: Check-out repository - uses: actions/checkout@v4 + npm install @vscode/vsce + npx vsce package - - name: Use Node.js from .nvmrc - uses: actions/setup-node@v4 + - name: Upload VSIX artifact + uses: actions/upload-artifact@v4 with: - node-version-file: "vscode/.nvmrc" + name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} + path: "vscode/*.vsix" - - name: Cache extension node_modules - uses: actions/cache@v3 + # Update latest release (only on Linux and for main branch) + - name: Update latest release + if: runner.os == 'Linux' && github.ref == 'refs/heads/main' + uses: marvinpinto/action-automatic-releases@latest with: - path: vscode/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }} - - - run: | - cd vscode - npm ci - - run: | - cd vscode - xvfb-run -a npm run test - \ No newline at end of file + repo_token: "${{secrets.GITHUB_TOKEN}}" + automatic_release_tag: "latest" + prerelease: true + title: "Development Build" + files: | + *.vsix diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 552af83..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Release - -on: - push: - branches: - - "main" - - "release-*" - - pull_request: - branches: - - "main" - - "release-*" - -jobs: - build: - name: Build and Release (${{ matrix.arch }}) - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-latest - arch: linux - - os: macos-latest - arch: macos - - os: windows-latest - arch: windows - max-parallel: 3 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version-file: "vscode/.nvmrc" - - - name: Install dependencies - working-directory: ./vscode - run: npm ci - - - name: Lint sources - working-directory: ./vscode - run: npm run lint - - - name: Build - working-directory: ./vscode - run: npm run package - - # Install Xvfb and Run tests on Linux - - name: Install Xvfb and Run tests (Linux) - if: matrix.arch == 'linux' - working-directory: ./vscode - run: | - sudo apt-get install -y xvfb - xvfb-run npm test - - # Run tests on macOS - - name: Run tests (macOS) - if: matrix.arch == 'macos' - working-directory: ./vscode - run: npm test - - # Run tests on Windows - - name: Run tests (Windows) - if: matrix.arch == 'windows' - working-directory: ./vscode - shell: cmd - run: npm test - - - name: Generate .vsix package - working-directory: ./vscode - run: | - npm install @vscode/vsce - npx vsce package - - - name: Upload VSIX artifact - uses: actions/upload-artifact@v4 - with: - name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} - path: "vscode/*.vsix" - - # Update latest release (only on Linux and for main branch) - - name: Update latest release - if: runner.os == 'Linux' && github.ref == 'refs/heads/main' - uses: marvinpinto/action-automatic-releases@latest - with: - repo_token: "${{secrets.GITHUB_TOKEN}}" - automatic_release_tag: "latest" - prerelease: true - title: "Development Build" - files: | - *.vsix From 1a50dc0e948e488c509744df9012bed223d85f8e Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Tue, 1 Oct 2024 13:10:57 -0400 Subject: [PATCH 18/29] cleanup Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index 306ec87..65c64b4 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -17,7 +17,7 @@ concurrency: jobs: build: - name: Build and Release (${{ matrix.arch }}) + name: Build and Package (${{ matrix.arch }}) runs-on: ${{ matrix.os }} strategy: matrix: @@ -41,12 +41,6 @@ jobs: with: node-version-file: "vscode/.nvmrc" - - name: Cache extension node_modules - uses: actions/cache@v3 - with: - path: vscode/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }} - - name: Install dependencies working-directory: ./vscode run: | From 28f40f28db4fa40d27e2b90da6059bfe7aa3e1db Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Tue, 1 Oct 2024 15:13:52 -0400 Subject: [PATCH 19/29] update action to release Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index 65c64b4..74eb7d5 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -88,13 +88,28 @@ jobs: path: "vscode/*.vsix" # Update latest release (only on Linux and for main branch) - - name: Update latest release - if: runner.os == 'Linux' && github.ref == 'refs/heads/main' - uses: marvinpinto/action-automatic-releases@latest + # - name: Update latest release + # if: runner.os == 'Linux' && github.ref == 'refs/heads/main' + # uses: marvinpinto/action-automatic-releases@latest + # with: + # repo_token: "${{secrets.GITHUB_TOKEN}}" + # automatic_release_tag: "latest" + # prerelease: true + # title: "Development Build" + # files: | + # *.vsix + + - name: Create or Update Pre-release + if: matrix.arch == 'linux' && github.ref == 'refs/heads/main' + uses: ncipollo/release-action@v1 with: - repo_token: "${{secrets.GITHUB_TOKEN}}" - automatic_release_tag: "latest" + tag: latest + releaseName: "Development Build - ${{ github.sha }}" + allowUpdates: true + overwrite: true + forceUpdateTag: true + commit: ${{ github.sha }} + artifacts: "vscode/*.vsix" prerelease: true - title: "Development Build" - files: | - *.vsix + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From cd3a947556b5c54e2115d20c85b5624037bb578c Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan <6026527+savitharaghunathan@users.noreply.github.com> Date: Tue, 1 Oct 2024 15:23:42 -0400 Subject: [PATCH 20/29] Delete .github/workflows/ci-repo.yml Signed-off-by: Savitha Raghunathan <6026527+savitharaghunathan@users.noreply.github.com> --- .github/workflows/ci-repo.yml | 115 ---------------------------------- 1 file changed, 115 deletions(-) delete mode 100644 .github/workflows/ci-repo.yml diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml deleted file mode 100644 index 74eb7d5..0000000 --- a/.github/workflows/ci-repo.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: CI (repo level) - -on: - push: - branches: - - "main" - - "release-*" - - pull_request: - branches: - - "main" - - "release-*" - -concurrency: - group: ci-repo-${{ github.event_name }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - name: Build and Package (${{ matrix.arch }}) - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-latest - arch: linux - - os: macos-latest - arch: macos - - os: windows-latest - arch: windows - max-parallel: 3 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version-file: "vscode/.nvmrc" - - - name: Install dependencies - working-directory: ./vscode - run: | - npm version - npm ci - - - name: Lint sources - working-directory: ./vscode - run: npm run lint - - - name: Build - working-directory: ./vscode - run: npm run package - - # Install Xvfb and Run tests on Linux - - name: Install Xvfb and Run tests (Linux) - if: matrix.arch == 'linux' - working-directory: ./vscode - run: - xvfb-run -a npm run test - - # Run tests on macOS - - name: Run tests (macOS) - if: matrix.arch == 'macos' - working-directory: ./vscode - run: npm test - - # Run tests on Windows - - name: Run tests (Windows) - if: matrix.arch == 'windows' - working-directory: ./vscode - shell: cmd - run: npm test - - - name: Generate .vsix package - working-directory: ./vscode - run: | - npm install @vscode/vsce - npx vsce package - - - name: Upload VSIX artifact - uses: actions/upload-artifact@v4 - with: - name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} - path: "vscode/*.vsix" - - # Update latest release (only on Linux and for main branch) - # - name: Update latest release - # if: runner.os == 'Linux' && github.ref == 'refs/heads/main' - # uses: marvinpinto/action-automatic-releases@latest - # with: - # repo_token: "${{secrets.GITHUB_TOKEN}}" - # automatic_release_tag: "latest" - # prerelease: true - # title: "Development Build" - # files: | - # *.vsix - - - name: Create or Update Pre-release - if: matrix.arch == 'linux' && github.ref == 'refs/heads/main' - uses: ncipollo/release-action@v1 - with: - tag: latest - releaseName: "Development Build - ${{ github.sha }}" - allowUpdates: true - overwrite: true - forceUpdateTag: true - commit: ${{ github.sha }} - artifacts: "vscode/*.vsix" - prerelease: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From e2fa7ecb00718eb95e17730c5ed3aee79fb59ab5 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Mon, 30 Sep 2024 15:59:52 -0400 Subject: [PATCH 21/29] try a new action Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 118 +++++++++++++++++++++------------- .github/workflows/release.yml | 97 ---------------------------- 2 files changed, 75 insertions(+), 140 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index 69ecc59..1d7d2e9 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -11,71 +11,103 @@ on: - "main" - "release-*" - workflow_dispatch: - - workflow_call: - concurrency: group: ci-repo-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true jobs: - package-tests: - runs-on: ubuntu-latest + build: + name: Build and Package (${{ matrix.arch }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + arch: linux + - os: macos-latest + arch: macos + - os: windows-latest + arch: windows + max-parallel: 3 steps: - - name: Check-out repository + - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} - - name: Use Node.js from .nvmrc + - name: Set up Node.js uses: actions/setup-node@v4 with: node-version-file: "vscode/.nvmrc" - - name: Cache extension node_modules - uses: actions/cache@v3 - with: - path: vscode/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }} - - name: Install dependencies + working-directory: ./vscode run: | - cd vscode npm version npm ci - name: Lint sources - run: | - cd vscode - npm run lint + working-directory: ./vscode + run: npm run lint - name: Build + working-directory: ./vscode + run: npm run package + + # Install Xvfb and Run tests on Linux + - name: Install Xvfb and Run tests (Linux) + if: matrix.arch == 'linux' + working-directory: ./vscode + run: + xvfb-run -a npm run test + + # Run tests on macOS + - name: Run tests (macOS) + if: matrix.arch == 'macos' + working-directory: ./vscode + run: npm test + + # Run tests on Windows + - name: Run tests (Windows) + if: matrix.arch == 'windows' + working-directory: ./vscode + shell: cmd + run: npm test + + - name: Generate .vsix package + working-directory: ./vscode run: | - cd vscode - npm run package - - vscode-tests: - runs-on: ubuntu-latest + npm install @vscode/vsce + npx vsce package - steps: - - name: Check-out repository - uses: actions/checkout@v4 - - - name: Use Node.js from .nvmrc - uses: actions/setup-node@v4 + - name: Upload VSIX artifact + uses: actions/upload-artifact@v4 with: - node-version-file: "vscode/.nvmrc" - - - name: Cache extension node_modules - uses: actions/cache@v3 + name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} + path: "vscode/*.vsix" + + # Update latest release (only on Linux and for main branch) + # - name: Update latest release + # if: runner.os == 'Linux' && github.ref == 'refs/heads/main' + # uses: marvinpinto/action-automatic-releases@latest + # with: + # repo_token: "${{secrets.GITHUB_TOKEN}}" + # automatic_release_tag: "latest" + # prerelease: true + # title: "Development Build" + # files: | + # *.vsix + + - name: Create or Update Pre-release + if: matrix.arch == 'linux' + uses: ncipollo/release-action@v1 with: - path: vscode/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }} - - - run: | - cd vscode - npm ci - - run: | - cd vscode - xvfb-run -a npm run test - \ No newline at end of file + tag: latest + name: "Development Build - ${{ github.sha }}" + allowUpdates: true + commit: ${{ github.sha }} + artifacts: "vscode/*.vsix" + prerelease: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 234810a..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: Release - -on: - push: - branches: - - "main" - - "release-*" - - pull_request: - branches: - - "main" - - "release-*" - -jobs: - build: - name: Build and Release (${{ matrix.arch }}) - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-latest - arch: linux - - os: macos-latest - arch: macos - - os: windows-latest - arch: windows - max-parallel: 3 - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version-file: "vscode/.nvmrc" - - - name: Install dependencies - working-directory: ./vscode - run: npm ci - - - name: Lint sources - working-directory: ./vscode - run: npm run lint - - - name: Build - working-directory: ./vscode - run: npm run package - - # Install Xvfb and Run tests on Linux - - name: Install Xvfb and Run tests (Linux) - if: matrix.arch == 'linux' - working-directory: ./vscode - run: | - sudo apt-get install -y xvfb - xvfb-run npm test - - # Run tests on macOS - - name: Run tests (macOS) - if: matrix.arch == 'macos' - working-directory: ./vscode - run: npm test - - # Run tests on Windows - - name: Run tests (Windows) - if: matrix.arch == 'windows' - working-directory: ./vscode - shell: cmd - run: npm test - - - name: Generate .vsix package - working-directory: ./vscode - run: | - npm install @vscode/vsce - npx vsce package - - - name: Upload VSIX artifact - uses: actions/upload-artifact@v4 - with: - name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} - path: "vscode/*.vsix" - - # Update latest release (only on Linux and for main branch) - - name: Create or Update Release - if: matrix.arch == 'linux' && github.ref == 'refs/heads/main' - uses: softprops/action-gh-release@v1 - with: - files: "vscode/*.vsix" - tag_name: "latest" - target_commitish: ${{ github.sha }} - overwrite: true - prerelease: true - name: "Development Build" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From aba0af386dc6a761c4769bc2c52afae47293262f Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Tue, 1 Oct 2024 15:41:34 -0400 Subject: [PATCH 22/29] update action Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index 1d7d2e9..bf51f84 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -88,26 +88,26 @@ jobs: path: "vscode/*.vsix" # Update latest release (only on Linux and for main branch) - # - name: Update latest release - # if: runner.os == 'Linux' && github.ref == 'refs/heads/main' - # uses: marvinpinto/action-automatic-releases@latest - # with: - # repo_token: "${{secrets.GITHUB_TOKEN}}" - # automatic_release_tag: "latest" - # prerelease: true - # title: "Development Build" - # files: | - # *.vsix - - - name: Create or Update Pre-release - if: matrix.arch == 'linux' - uses: ncipollo/release-action@v1 + - name: Update latest release + if: runner.os == 'Linux' && github.ref == 'refs/heads/main' + uses: marvinpinto/action-automatic-releases@latest with: - tag: latest - name: "Development Build - ${{ github.sha }}" - allowUpdates: true - commit: ${{ github.sha }} - artifacts: "vscode/*.vsix" + repo_token: "${{secrets.GITHUB_TOKEN}}" + automatic_release_tag: "latest" prerelease: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + title: "Development Build" + files: | + *.vsix + + # - name: Create or Update Pre-release + # if: matrix.arch == 'linux' + # uses: ncipollo/release-action@v1 + # with: + # tag: latest + # name: "Development Build - ${{ github.sha }}" + # allowUpdates: true + # commit: ${{ github.sha }} + # artifacts: "vscode/*.vsix" + # prerelease: true + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 80e6355cbee058bb623319cb8e010e917b12078c Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Tue, 1 Oct 2024 16:30:11 -0400 Subject: [PATCH 23/29] update action Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index 1d9f6b9..0914ec7 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -88,26 +88,26 @@ jobs: path: "vscode/*.vsix" # Update latest release (only on Linux and for main branch) - - name: Update latest release - if: runner.os == 'Linux' && github.ref == 'refs/heads/main' - uses: marvinpinto/action-automatic-releases@latest - with: - repo_token: "${{secrets.GITHUB_TOKEN}}" - automatic_release_tag: "latest" - prerelease: true - title: "Development Build" - files: | - *.vsix - - # - name: Create or Update Pre-release - # if: matrix.arch == 'linux' - # uses: ncipollo/release-action@v1 + # - name: Update latest release + # if: runner.os == 'Linux' && github.ref == 'refs/heads/main' + # uses: marvinpinto/action-automatic-releases@latest # with: - # tag: latest - # name: "Development Build - ${{ github.sha }}" - # allowUpdates: true - # commit: ${{ github.sha }} - # artifacts: "vscode/*.vsix" + # repo_token: "${{secrets.GITHUB_TOKEN}}" + # automatic_release_tag: "latest" # prerelease: true - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # title: "Development Build" + # files: | + # *.vsix + + - name: Create or Update Pre-release + if: matrix.arch == 'linux' && github.ref == 'refs/heads/main' + uses: ncipollo/release-action@v1 + with: + tag: latest + name: "Development Build - ${{ github.sha }}" + allowUpdates: true + commit: ${{ github.sha }} + artifacts: "vscode/*.vsix" + prerelease: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b0cbe77f9b7b925650eb0e508f3ef04d662f624e Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Tue, 1 Oct 2024 16:36:03 -0400 Subject: [PATCH 24/29] updating tag name Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index 0914ec7..50255df 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -87,24 +87,19 @@ jobs: name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} path: "vscode/*.vsix" - # Update latest release (only on Linux and for main branch) - # - name: Update latest release - # if: runner.os == 'Linux' && github.ref == 'refs/heads/main' - # uses: marvinpinto/action-automatic-releases@latest - # with: - # repo_token: "${{secrets.GITHUB_TOKEN}}" - # automatic_release_tag: "latest" - # prerelease: true - # title: "Development Build" - # files: | - # *.vsix + - name: Generate tag name + id: vars + shell: bash + run: | + SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-8) + TAG_NAME="dev-${SHORT_SHA}" + echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT - name: Create or Update Pre-release if: matrix.arch == 'linux' && github.ref == 'refs/heads/main' uses: ncipollo/release-action@v1 with: - tag: latest - name: "Development Build - ${{ github.sha }}" + tag: ${{ steps.vars.outputs.tag_name }} allowUpdates: true commit: ${{ github.sha }} artifacts: "vscode/*.vsix" From 547d1fcf6d64b985fd5e4e53adccc6d9df33c1c9 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Wed, 2 Oct 2024 08:42:47 -0400 Subject: [PATCH 25/29] adding cache stuff back Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index 50255df..272cfed 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -40,6 +40,12 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: "vscode/.nvmrc" + + - name: Cache extension node_modules + uses: actions/cache@v3 + with: + path: vscode/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('vscode/package-lock.json') }} - name: Install dependencies working-directory: ./vscode From 2df37576765e61229ae32fc08dde8e20adccd2d1 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Wed, 2 Oct 2024 15:44:49 -0400 Subject: [PATCH 26/29] adding review feedback Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 97 ++++++++++++++++++++++++++++++----- 1 file changed, 84 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index 272cfed..d19ced2 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -10,14 +10,17 @@ on: branches: - "main" - "release-*" + workflow_dispatch: + workflow_call: + concurrency: group: ci-repo-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true jobs: build: - name: Build and Package (${{ matrix.arch }}) + name: Build (${{ matrix.arch }}) runs-on: ${{ matrix.os }} strategy: matrix: @@ -40,7 +43,7 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: "vscode/.nvmrc" - + - name: Cache extension node_modules uses: actions/cache@v3 with: @@ -50,19 +53,41 @@ jobs: - name: Install dependencies working-directory: ./vscode run: | - npm version npm ci - name: Lint sources working-directory: ./vscode run: npm run lint - - name: Build + test: + name: Test (${{ matrix.arch }}) + runs-on: ${{ matrix.os }} + needs: build + strategy: + matrix: + include: + - os: ubuntu-latest + arch: linux + - os: macos-latest + arch: macos + - os: windows-latest + arch: windows + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version-file: "vscode/.nvmrc" + + - name: Install dependencies working-directory: ./vscode - run: npm run package + run: npm ci - # Install Xvfb and Run tests on Linux - - name: Install Xvfb and Run tests (Linux) + # Run tests on Linux + - name: Run tests (Linux) if: matrix.arch == 'linux' working-directory: ./vscode run: @@ -81,6 +106,38 @@ jobs: shell: cmd run: npm test + package: + name: Package (${{ matrix.arch }}) + runs-on: ${{ matrix.os }} + needs: test + strategy: + matrix: + include: + - os: ubuntu-latest + arch: linux + - os: macos-latest + arch: macos + - os: windows-latest + arch: windows + max-parallel: 3 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version-file: "vscode/.nvmrc" + + - name: Install dependencies + working-directory: ./vscode + run: npm ci + + - name: Build Package + working-directory: ./vscode + run: npm run package + - name: Generate .vsix package working-directory: ./vscode run: | @@ -90,25 +147,39 @@ jobs: - name: Upload VSIX artifact uses: actions/upload-artifact@v4 with: - name: vscode-extension-${{ matrix.arch }}-${{ github.run_id }} + name: vscode-extension-${{ matrix.arch }} path: "vscode/*.vsix" + release: + name: Release + runs-on: ubuntu-latest + needs: package + if: github.ref == 'refs/heads/main' + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download VSIX artifacts + uses: actions/download-artifact@v3 + with: + path: ./artifacts + - name: Generate tag name id: vars shell: bash run: | SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-8) - TAG_NAME="dev-${SHORT_SHA}" + TAG_NAME="v0.0.1-dev-${SHORT_SHA}" echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT - - name: Create or Update Pre-release - if: matrix.arch == 'linux' && github.ref == 'refs/heads/main' + - name: Create Pre-release uses: ncipollo/release-action@v1 with: tag: ${{ steps.vars.outputs.tag_name }} - allowUpdates: true + releaseName: "Development Build - ${{ steps.vars.outputs.tag_name }}" commit: ${{ github.sha }} - artifacts: "vscode/*.vsix" + artifacts: "./artifacts/**/*.vsix" prerelease: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ee5b896e68ce3e9e39d536ad1787481c8f3caaeb Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Wed, 2 Oct 2024 15:55:54 -0400 Subject: [PATCH 27/29] bumping node version to avoid moudule not found error Signed-off-by: Savitha Raghunathan --- vscode/.nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/.nvmrc b/vscode/.nvmrc index d79a9a2..67d2ffe 100644 --- a/vscode/.nvmrc +++ b/vscode/.nvmrc @@ -1 +1 @@ -v20.13.0 \ No newline at end of file +v20.13.1 \ No newline at end of file From 9a0bd481119ca10f1cf9e19c9bf1db67f9735192 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Thu, 3 Oct 2024 12:10:53 -0400 Subject: [PATCH 28/29] updating the release job Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 30 ++++++++++++++++++++++---- .github/workflows/nightly-ci-repo.yaml | 2 ++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index d19ced2..8dc3d5e 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -11,8 +11,20 @@ on: - "main" - "release-*" workflow_dispatch: + inputs: + shouldRelease: + description: 'Should a release be created?' + required: false + default: 'false' workflow_call: + inputs: + shouldRelease: + type: boolean + description: 'Should a release be created?' + required: false + default: false + concurrency: group: ci-repo-${{ github.event_name }}-${{ github.ref }} @@ -154,23 +166,33 @@ jobs: name: Release runs-on: ubuntu-latest needs: package - if: github.ref == 'refs/heads/main' + if: + github.ref == 'refs/heads/main' && + (github.event.inputs.shouldRelease == 'true' || github.event.inputs.shouldRelease == true) steps: - name: Checkout code uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version-file: "vscode/.nvmrc" - name: Download VSIX artifacts uses: actions/download-artifact@v3 with: path: ./artifacts - - name: Generate tag name + - name: Read version from package.json + id: get_version + run: echo "version=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT + + - name: Generate tag name with timestamp id: vars shell: bash run: | - SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-8) - TAG_NAME="v0.0.1-dev-${SHORT_SHA}" + TAG_NAME="v${{ steps.get_version.outputs.version }}-dev+$(date +%Y%m%d)" echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT - name: Create Pre-release diff --git a/.github/workflows/nightly-ci-repo.yaml b/.github/workflows/nightly-ci-repo.yaml index 2c1ef23..929b0dd 100644 --- a/.github/workflows/nightly-ci-repo.yaml +++ b/.github/workflows/nightly-ci-repo.yaml @@ -9,3 +9,5 @@ on: jobs: nightly: uses: ./.github/workflows/ci-repo.yml + with: + shouldRelease: true \ No newline at end of file From 6170e60662c0a75557a746e673a0f6ecd092dd50 Mon Sep 17 00:00:00 2001 From: Savitha Raghunathan Date: Thu, 3 Oct 2024 12:58:55 -0400 Subject: [PATCH 29/29] add missing working dir formatting fixes dropping release name Signed-off-by: Savitha Raghunathan --- .github/workflows/ci-repo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-repo.yml b/.github/workflows/ci-repo.yml index 8dc3d5e..9f79663 100644 --- a/.github/workflows/ci-repo.yml +++ b/.github/workflows/ci-repo.yml @@ -166,7 +166,7 @@ jobs: name: Release runs-on: ubuntu-latest needs: package - if: + if: | github.ref == 'refs/heads/main' && (github.event.inputs.shouldRelease == 'true' || github.event.inputs.shouldRelease == true) @@ -186,6 +186,7 @@ jobs: - name: Read version from package.json id: get_version + working-directory: ./vscode run: echo "version=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT - name: Generate tag name with timestamp @@ -199,7 +200,6 @@ jobs: uses: ncipollo/release-action@v1 with: tag: ${{ steps.vars.outputs.tag_name }} - releaseName: "Development Build - ${{ steps.vars.outputs.tag_name }}" commit: ${{ github.sha }} artifacts: "./artifacts/**/*.vsix" prerelease: true