Skip to content

Commit 377f696

Browse files
Merge pull request #8 from phuongdnguyen/publish-workflow
Vscode & jetbrains plugins
2 parents d59f5f5 + 8a26435 commit 377f696

File tree

4 files changed

+255
-4
lines changed

4 files changed

+255
-4
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Publish JetBrains Plugin
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- main
9+
- publish-workflow
10+
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'Plugin version to publish (e.g., 1.0.0)'
14+
required: true
15+
type: string
16+
17+
jobs:
18+
publish:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up JDK 17
26+
uses: actions/setup-java@v4
27+
with:
28+
java-version: '17'
29+
distribution: 'temurin'
30+
cache: 'gradle'
31+
32+
- name: Setup Gradle
33+
uses: gradle/gradle-build-action@v2
34+
with:
35+
gradle-home-cache-cleanup: true
36+
37+
- name: Build plugin
38+
run: |
39+
cd jetbrains-plugin
40+
./gradlew build
41+
42+
- name: Run tests
43+
run: |
44+
cd jetbrains-plugin
45+
./gradlew test
46+
47+
- name: Create plugin package
48+
run: |
49+
cd jetbrains-plugin
50+
./gradlew buildPlugin
51+
env:
52+
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
53+
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
54+
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
55+
56+
- name: Upload plugin artifact
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: temporal-workflow-debugger-plugin
60+
path: jetbrains-plugin/build/distributions/*.zip
61+
62+
- name: Publish to JetBrains Marketplace
63+
if: startsWith(github.ref, 'refs/tags/v')
64+
run: |
65+
cd jetbrains-plugin
66+
./gradlew publishPlugin
67+
env:
68+
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_PUBLISH_TOKEN }}
69+
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
70+
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
71+
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
72+
73+
- name: Manual publish to JetBrains Marketplace
74+
if: github.event_name == 'workflow_dispatch'
75+
run: |
76+
cd jetbrains-plugin
77+
# Update version in build.gradle.kts if provided
78+
if [ -n "${{ github.event.inputs.version }}" ]; then
79+
sed -i "s/version = \".*\"/version = \"${{ github.event.inputs.version }}\"/" build.gradle.kts
80+
fi
81+
./gradlew publishPlugin
82+
env:
83+
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_PUBLISH_TOKEN }}
84+
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
85+
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
86+
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Publish Python Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'Package version to publish (e.g., 1.0.0)'
13+
required: true
14+
type: string
15+
16+
jobs:
17+
publish:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: '3.11'
28+
29+
- name: Install build dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install build twine
33+
34+
- name: Build package
35+
run: |
36+
cd replayer-adapter-python
37+
python -m build
38+
39+
- name: Run tests (if available)
40+
run: |
41+
cd replayer-adapter-python
42+
pip install -e ".[dev]"
43+
python -m pytest tests/ -v
44+
continue-on-error: true
45+
46+
- name: Publish to PyPI
47+
if: startsWith(github.ref, 'refs/tags/v')
48+
run: |
49+
cd replayer-adapter-python
50+
python -m twine upload --repository pypi dist/*
51+
env:
52+
TWINE_USERNAME: __token__
53+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
54+
55+
- name: Manual publish to PyPI
56+
if: github.event_name == 'workflow_dispatch'
57+
run: |
58+
cd replayer-adapter-python
59+
# Update version in pyproject.toml if provided
60+
if [ -n "${{ github.event.inputs.version }}" ]; then
61+
sed -i 's/version = ".*"/version = "${{ github.event.inputs.version }}"/' pyproject.toml
62+
fi
63+
python -m build
64+
python -m twine upload --repository pypi dist/*
65+
env:
66+
TWINE_USERNAME: __token__
67+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
68+
69+
- name: Create GitHub Release
70+
if: startsWith(github.ref, 'refs/tags/v')
71+
uses: actions/create-release@v1
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
with:
75+
tag_name: ${{ github.ref }}
76+
release_name: Release ${{ github.ref }}
77+
body: |
78+
## Changes in this release
79+
80+
This release includes updates to the Temporal Workflow Debugger Python replayer adapter.
81+
82+
### Package: temporal-replayer-adapter-python
83+
84+
- Version: ${{ github.ref_name }}
85+
- Built from commit: ${{ github.sha }}
86+
draft: false
87+
prerelease: false
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Publish VS Code Extension
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'Version to publish (e.g., 1.0.0)'
13+
required: true
14+
type: string
15+
16+
jobs:
17+
publish:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '18'
28+
cache: 'npm'
29+
cache-dependency-path: vscode-debugger-extension/package-lock.json
30+
31+
- name: Install dependencies
32+
run: |
33+
cd vscode-debugger-extension
34+
npm ci
35+
36+
- name: Run linting
37+
run: |
38+
cd vscode-debugger-extension
39+
npm run lint
40+
41+
- name: Run tests
42+
run: |
43+
cd vscode-debugger-extension
44+
npm test
45+
46+
- name: Build extension
47+
run: |
48+
cd vscode-debugger-extension
49+
npm run build
50+
51+
- name: Package extension
52+
run: |
53+
cd vscode-debugger-extension
54+
npx vsce package
55+
56+
- name: Publish to VS Code Marketplace
57+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
58+
run: |
59+
cd vscode-debugger-extension
60+
npx vsce publish --pat ${{ secrets.VSCE_PAT }}
61+
env:
62+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
63+
64+
- name: Publish to VS Code Marketplace (Manual)
65+
if: github.event_name == 'workflow_dispatch'
66+
run: |
67+
cd vscode-debugger-extension
68+
# Update version in package.json
69+
npm version ${{ github.event.inputs.version }} --no-git-tag-version
70+
npx vsce publish --pat ${{ secrets.VSCE_PAT }}
71+
env:
72+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
73+
74+
- name: Upload extension package
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: temporalio-extension
78+
path: vscode-debugger-extension/*.vsix

vscode-debugger-extension/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "temporalio",
3-
"displayName": "Temporal.io",
2+
"name": "temporal-workflow-debugger",
3+
"displayName": "Temporal workflow debugger",
44
"version": "0.1.2",
55
"description": "Debug workflows by their ID or history file. Set breakpoints in code or on history events.",
66
"categories": [
@@ -15,10 +15,10 @@
1515
],
1616
"repository": {
1717
"type": "git",
18-
"url": "https://github.com/temporalio/vscode-debugger-extension"
18+
"url": "https://github.com/phuongdnguyen/temporal-workflow-debugger/vscode-debugger-extension"
1919
},
2020
"license": "MIT",
21-
"publisher": "temporal-technologies",
21+
"publisher": "phuongdnguyen",
2222
"main": "./extension/dist/extension.js",
2323
"scripts": {
2424
"build": "concurrently \"npm run build.extension\" \"npm run build.webview\"",

0 commit comments

Comments
 (0)