diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..0c7370e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,56 @@ +name: Publish Extension + +on: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Build extension + run: npm run build + + - name: Install vsce + run: npm install -g @vscode/vsce + + - name: Verify package.json + run: | + echo "Extension details:" + node -e "const pkg = require('./package.json'); console.log('Name:', pkg.name); console.log('Version:', pkg.version); console.log('Publisher:', pkg.publisher);" + + - name: Package extension + run: vsce package + + - name: Publish to VSCode Marketplace + run: vsce publish -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} + env: + VSCODE_MARKETPLACE_TOKEN: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + files: '*.vsix' + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload VSIX as artifact + uses: actions/upload-artifact@v4 + with: + name: extension-vsix + path: '*.vsix' diff --git a/package.json b/package.json index 459b96f..617a745 100644 --- a/package.json +++ b/package.json @@ -14,12 +14,28 @@ }, "homepage": "https://github.com/MarioLJFerreira/vscode-42header-plus", "license": "MIT", + "keywords": [ + "42", + "header", + "42network", + "school42", + "42school", + "ecole42", + "42header", + "code-header", + "file-header" + ], "engines": { "vscode": "^1.6.0" }, "categories": [ + "Formatters", "Other" ], + "galleryBanner": { + "color": "#1E1E1E", + "theme": "dark" + }, "activationEvents": [ "*" ],