From da475bbc0d720b3c9e978ada931d99f116f3e6ba Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:29:07 +0200 Subject: [PATCH 1/7] Update github actions versions --- .github/workflows/client-ci.yml | 6 +++--- .github/workflows/release.yml | 10 +++++----- .github/workflows/server-ci.yml | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/client-ci.yml b/.github/workflows/client-ci.yml index 7dbebaa..aeb26a2 100644 --- a/.github/workflows/client-ci.yml +++ b/.github/workflows/client-ci.yml @@ -18,13 +18,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python for local environment - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - run: npm install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e934dc8..80834ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get version from tag id: get_version @@ -56,10 +56,10 @@ jobs: working-directory: server steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 @@ -85,10 +85,10 @@ jobs: working-directory: client steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 16 diff --git a/.github/workflows/server-ci.yml b/.github/workflows/server-ci.yml index b157106..0883996 100644 --- a/.github/workflows/server-ci.yml +++ b/.github/workflows/server-ci.yml @@ -20,9 +20,9 @@ jobs: working-directory: server steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From 2c43c9add5c892d51fcb790edf1b223bbe311a52 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:29:25 +0200 Subject: [PATCH 2/7] Update Node.js versions in GitHub Actions workflows --- .github/workflows/client-ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/client-ci.yml b/.github/workflows/client-ci.yml index aeb26a2..9fca512 100644 --- a/.github/workflows/client-ci.yml +++ b/.github/workflows/client-ci.yml @@ -26,7 +26,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 21 - run: npm install - name: Run integration tests run: xvfb-run -a npm run test:e2e diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80834ef..becae2f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,7 +90,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 21 - name: Clean install dependencies run: | From de80753126840ace1a5308b88d4a87f474d994a5 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:37:59 +0200 Subject: [PATCH 3/7] Replace get-version action in release workflow --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index becae2f..f1037cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - name: Get version from tag id: get_version - uses: battila7/get-version-action@v2 + uses: jannemattila/get-version-from-tag@v3 - name: Create Release id: create_release @@ -39,12 +39,12 @@ jobs: The Galaxy Tools Extension is available at [Open VSX Registry](https://open-vsx.org/extension/davelopez/galaxy-tools) and [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=davelopez.galaxy-tools). You can also install the extension manually by downloading the VSIX package included in this release and using: ``` - code --install-extension galaxy-tools-${{ steps.get_version.outputs.version-without-v }}.vsix + code --install-extension galaxy-tools-${{ steps.get_version.outputs.version }}.vsix ``` draft: false prerelease: false outputs: - release_version: ${{ steps.get_version.outputs.version-without-v }} + release_version: ${{ steps.get_version.outputs.version }} release_upload_url: ${{ steps.create_release.outputs.upload_url }} publish-server: From 086b47a1f78f2b0e22eb8189f945fe1a961c91c8 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:40:32 +0200 Subject: [PATCH 4/7] Update release workflow to use softprops/action-gh-release --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1037cb..a0d0347 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,12 +22,11 @@ jobs: - name: Create Release id: create_release - uses: actions/create-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + name: Release ${{ github.ref }} body: | This release contains the [Galaxy Language Server](https://github.com/davelopez/galaxy-language-server/tree/main/server) and the [Galaxy Tools Visual Studio Code Extension](https://github.com/davelopez/galaxy-language-server/tree/main/client). You can view the list of changes in the respective changelogs: From 0204de135ab135470804d2dd4785940084647744 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:41:57 +0200 Subject: [PATCH 5/7] Update release workflow to create draft release with notes --- .github/workflows/release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0d0347..1cd93dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ on: jobs: prepare_release: - name: Create Release + name: Prepare Release runs-on: ubuntu-latest steps: - name: Checkout code @@ -20,7 +20,7 @@ jobs: id: get_version uses: jannemattila/get-version-from-tag@v3 - - name: Create Release + - name: Create Draf Release id: create_release uses: softprops/action-gh-release@v2 env: @@ -40,8 +40,9 @@ jobs: ``` code --install-extension galaxy-tools-${{ steps.get_version.outputs.version }}.vsix ``` - draft: false + draft: true prerelease: false + generate_release_notes: true outputs: release_version: ${{ steps.get_version.outputs.version }} release_upload_url: ${{ steps.create_release.outputs.upload_url }} From bea84e6faf25f62278de4af6e4234ffcad5ad3e9 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:49:46 +0200 Subject: [PATCH 6/7] Refactor release workflow to reuse vsix package --- .github/workflows/release.yml | 51 ++++++++++++++++------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1cd93dc..e2fe097 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,21 @@ jobs: id: get_version uses: jannemattila/get-version-from-tag@v3 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 21 + + - run: npm ci + + - name: Package Extension + id: packageExtension + uses: HaaLeo/publish-vscode-extension@v1 + with: + pat: stub + packagePath: "./client/" + dryRun: true + - name: Create Draf Release id: create_release uses: softprops/action-gh-release@v2 @@ -43,9 +58,11 @@ jobs: draft: true prerelease: false generate_release_notes: true + files: ${{ steps.packageExtension.outputs.vsixPath }} outputs: release_version: ${{ steps.get_version.outputs.version }} release_upload_url: ${{ steps.create_release.outputs.upload_url }} + vsixPath: ${{ steps.packageExtension.outputs.vsixPath }} publish-server: name: Publish Language Server to PyPI @@ -92,10 +109,6 @@ jobs: with: node-version: 21 - - name: Clean install dependencies - run: | - npm ci - - name: Update version in package.json uses: onlyutkarsh/patch-files-action@v1.0.5 with: @@ -103,34 +116,16 @@ jobs: patch-syntax: | = /version => "${{needs.prepare_release.outputs.release_version}}" - - name: Publish to Open VSX Registry - uses: HaaLeo/publish-vscode-extension@v1 - id: publishToOpenVSX - with: - pat: ${{ secrets.OPEN_VSX_TOKEN }} - packagePath: "./client/" - - name: Publish to Visual Studio Marketplace uses: HaaLeo/publish-vscode-extension@v1 with: pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} registryUrl: https://marketplace.visualstudio.com - extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }} - packagePath: "" - - - name: Upload vsix as artifact - uses: actions/upload-artifact@v3 - with: - name: galaxy-tools-${{needs.prepare_release.outputs.release_version}}.vsix - path: ${{ steps.publishToOpenVSX.outputs.vsixPath }} + extensionFile: ${{ needs.prepare_release.outputs.vsixPath}} - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Publish to Open VSX Registry + uses: HaaLeo/publish-vscode-extension@v1 + id: publishToOpenVSX with: - upload_url: ${{ needs.prepare_release.outputs.release_upload_url }} - asset_path: ${{ steps.publishToOpenVSX.outputs.vsixPath }} - asset_name: galaxy-tools-${{needs.prepare_release.outputs.release_version}}.vsix - asset_content_type: application/vsix + pat: ${{ secrets.OPEN_VSX_TOKEN }} + extensionFile: ${{ needs.prepare_release.outputs.vsixPath}} From 5217265e6f81738ee1970f9110744885ac2f9041 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:51:41 +0200 Subject: [PATCH 7/7] Drop update version in package.json from release action This is done as part of the pre-release procedure --- .github/workflows/release.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2fe097..7c1b56b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -109,13 +109,6 @@ jobs: with: node-version: 21 - - name: Update version in package.json - uses: onlyutkarsh/patch-files-action@v1.0.5 - with: - files: "${{github.workspace}}/client/package.json" - patch-syntax: | - = /version => "${{needs.prepare_release.outputs.release_version}}" - - name: Publish to Visual Studio Marketplace uses: HaaLeo/publish-vscode-extension@v1 with: