Skip to content

Commit

Permalink
Adding build file
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Drew committed Feb 12, 2025
1 parent ed16c56 commit 4e9cec1
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 25 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/ant.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build and Publish VSCode Extension

on:
push:
branches:
- main
workflow_dispatch: # Allows manual triggering

permissions:
contents: write

jobs:
build-and-publish:
name: Build and Publish VSCode Extension
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
run: npm install

- name: Install VSCE (VSCode Extension Manager)
run: npm install -g @vscode/vsce

- name: Install Ant
run: sudo apt-get install -y ant

- name: Install Maven
uses: s4u/setup-maven-action@v1
with:
maven-version: '3.9.6'

- name: Authenticate with VSCode Marketplace
run: echo "$VSCE_PAT" | vsce login $VSCODE_PUBLISHER
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
VSCODE_PUBLISHER: ${{ secrets.VSCODE_PUBLISHER }}

- name: Build and Publish Extension
run: npm run vscode:publish

- name: Package VSIX File
run: vsce package

- name: Get Package Version
id: package_version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}
name: Release v${{ env.VERSION }}
body: "VSCode Extension version ${{ env.VERSION }}"
draft: false
prerelease: false
files: "*.vsix"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4e9cec1

Please sign in to comment.