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

Update CI actions #256

Merged
merged 7 commits into from
Jul 6, 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
8 changes: 4 additions & 4 deletions .github/workflows/client-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ 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
node-version: 21
- run: npm install
- name: Run integration tests
run: xvfb-run -a npm run test:e2e
Expand Down
88 changes: 38 additions & 50 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,38 @@ on:

jobs:
prepare_release:
name: Create Release
name: Prepare Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get version from tag
id: get_version
uses: battila7/get-version-action@v2
uses: jannemattila/get-version-from-tag@v3

- name: Create Release
- 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: 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:
Expand All @@ -39,13 +53,16 @@ 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
draft: true
prerelease: false
generate_release_notes: true
files: ${{ steps.packageExtension.outputs.vsixPath }}
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 }}
vsixPath: ${{ steps.packageExtension.outputs.vsixPath }}

publish-server:
name: Publish Language Server to PyPI
Expand All @@ -56,10 +73,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

Expand All @@ -85,52 +102,23 @@ 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

- name: Clean install dependencies
run: |
npm ci

- name: Update version in package.json
uses: onlyutkarsh/[email protected]
with:
files: "${{github.workspace}}/client/package.json"
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/"
node-version: 21

- 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}}
4 changes: 2 additions & 2 deletions .github/workflows/server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down