Skip to content

Commit a9a0729

Browse files
Merge pull request #4 from dicodingacademy/vs-code-extensions
VS Code Extensions Support
2 parents 5268a2c + 802fed7 commit a9a0729

50 files changed

Lines changed: 989 additions & 231 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags: [ 'v*' ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
# Set up Java for IntelliJ plugin
20+
- name: Set up JDK
21+
uses: actions/setup-java@v3
22+
with:
23+
java-version: '17'
24+
distribution: 'temurin'
25+
26+
# Set up Node.js for VS Code extension
27+
- name: Set up Node.js
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: '18'
31+
cache: 'npm'
32+
33+
# Install dependencies
34+
- name: Install dependencies
35+
run: npm install
36+
37+
# Build both plugins
38+
- name: Build
39+
run: npm run build
40+
41+
# Package VS Code extension
42+
- name: Package VS Code extension
43+
run: npm run package:vscode
44+
45+
# Upload IntelliJ plugin artifact
46+
- name: Upload IntelliJ Plugin
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: intellij-plugin
50+
path: intellij-plugin/build/distributions/*.zip
51+
52+
# Upload VS Code extension artifact
53+
- name: Upload VS Code Extension
54+
uses: actions/upload-artifact@v3
55+
with:
56+
name: vscode-extension
57+
path: vscode-extension/*.vsix
58+
59+
# Upload IntelliJ plugin to S3 (only on tag)
60+
- name: Upload IntelliJ Plugin to S3
61+
if: startsWith(github.ref, 'refs/tags/v')
62+
uses: shallwefootball/s3-upload-action@master
63+
with:
64+
aws_key_id: ${{ secrets.STORAGE_KEY_ID }}
65+
aws_secret_access_key: ${{ secrets.STORAGE_KEY_SECRET }}
66+
aws_bucket: ${{ secrets.TOOLS_BUCKET }}
67+
source_dir: 'intellij-plugin/build/distributions'
68+
endpoint: 'https://s3.nevaobjects.id'
69+
70+
# Upload VS Code extension to S3 (only on tag)
71+
- name: Upload VS Code Extension to S3
72+
if: startsWith(github.ref, 'refs/tags/v')
73+
uses: shallwefootball/s3-upload-action@master
74+
with:
75+
aws_key_id: ${{ secrets.STORAGE_KEY_ID }}
76+
aws_secret_access_key: ${{ secrets.STORAGE_KEY_SECRET }}
77+
aws_bucket: ${{ secrets.TOOLS_BUCKET }}
78+
source_dir: 'vscode-extension'
79+
endpoint: 'https://s3.nevaobjects.id'
80+
81+
release:
82+
needs: build
83+
if: startsWith(github.ref, 'refs/tags/v')
84+
runs-on: ubuntu-latest
85+
steps:
86+
- uses: actions/checkout@v4
87+
88+
# Download artifacts
89+
- name: Download artifacts
90+
uses: actions/download-artifact@v3
91+
92+
# Create GitHub Release
93+
- name: Create Release
94+
uses: softprops/action-gh-release@v1
95+
with:
96+
files: |
97+
intellij-plugin/*.zip
98+
vscode-extension/*.vsix
99+
name: "Release ${{ github.ref_name }}"
100+
tag_name: ${{ github.ref_name }}
101+
body: |
102+
Platform Sync Release ${{ github.ref_name }}
103+
104+
This release includes both IntelliJ IDEA plugin and VS Code extension.
105+
draft: false
106+
prerelease: false

.github/workflows/release.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.gitignore

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,46 @@
1-
/.gradle/
2-
/build/
1+
# IntelliJ IDEA
2+
.idea/
3+
*.iml
4+
*.iws
5+
*.ipr
6+
.gradle/
7+
build/
8+
out/
9+
10+
# VS Code
11+
.vscode/*
12+
!.vscode/settings.json
13+
!.vscode/tasks.json
14+
!.vscode/launch.json
15+
!.vscode/extensions.json
16+
*.code-workspace
17+
.history/
18+
19+
# Node.js
20+
node_modules/
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
.npm/
25+
.yarn/
26+
dist/
27+
*.vsix
28+
29+
# Logs
30+
logs/
31+
*.log
32+
33+
# OS specific
34+
.DS_Store
35+
Thumbs.db
36+
37+
# Environment variables
38+
.env
39+
.env.local
40+
.env.*.local
41+
42+
# Build output
43+
intellij-plugin/build/
44+
vscode-extension/out/
45+
vscode-extension/dist/
46+
*.zip
-3.35 MB
Binary file not shown.
-17 Bytes
Binary file not shown.
-1 Bytes
Binary file not shown.
-23.1 KB
Binary file not shown.
-17 Bytes
Binary file not shown.

.gradle/6.7/gc.properties

Whitespace-only changes.
-17 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)