Create main.yml #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Acode Plugin | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: # Bisa dijalankan manual dari GitHub UI | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout kode | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Setup Node.js | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "npm" | |
| # Install dependencies | |
| - name: Install dependencies | |
| run: npm install | |
| # Build pakai esbuild | |
| - name: Run build script | |
| run: npm run build | |
| # Upload hasil build (ZIP plugin) | |
| - name: Upload plugin artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: acode-plugin | |
| path: .acode/*.zip |