Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
changelog:
exclude:
labels:
- ignore-for-release
- dependencies
authors:
- dependabot
- github-actions
categories:
- title: "🚀 Features"
labels:
- feature
- enhancement
- title: "🐛 Bug Fixes"
labels:
- bug
- fix
- title: "📝 Documentation"
labels:
- documentation
- docs
- title: "🧹 Maintenance"
labels:
- chore
- refactor
- cleanup
- title: "⬆️ Dependencies"
labels:
- dependencies
- title: "Other Changes"
labels:
- "*"
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Build and Package (p2 ZIP)
name: Build GitHub Copilot for Anypoint Studio (Universal)

on:
push:
branches: [ build ]
branches: [ build/universal ]
workflow_dispatch:

env:
Expand Down Expand Up @@ -91,6 +91,7 @@ jobs:
tag_name: "v${{ env.COPILOT_DISPLAY_VERSION }}"
name: "GitHub Copilot for Anypoint Studio v${{ env.COPILOT_DISPLAY_VERSION }}"
prerelease: true
generate_release_notes: true
body: |
Pre-release build of GitHub Copilot for Anypoint Studio.

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-win-mac-universal.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Package (p2 ZIP)
name: Build GitHub Copilot for Anypoint Studio (Windows, macOS & Universal)

on:
push:
Expand Down Expand Up @@ -113,6 +113,7 @@ jobs:
tag_name: "v${{ env.COPILOT_DISPLAY_VERSION }}"
name: "GitHub Copilot for Anypoint Studio v${{ env.COPILOT_DISPLAY_VERSION }}"
prerelease: true
generate_release_notes: true
body: |
Pre-release build of GitHub Copilot for Anypoint Studio.

Expand Down
133 changes: 133 additions & 0 deletions .github/workflows/build-win-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Build GitHub Copilot for Anypoint Studio (Windows and macOS)

on:
push:
branches: [ build/win-mac ]
workflow_dispatch:

env:
MAVEN_OPTS: -Xmx2g

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Extract plugin version
run: |
VERSION=$(grep -oP '(?<=<copilot-plugin-version>)[^<]+' pom.xml)
TIMESTAMP=$(date -u +%Y%m%d%H%M%S)
DISPLAY_VERSION="${VERSION/-SNAPSHOT/-$TIMESTAMP}"
echo "COPILOT_PLUGIN_VERSION=$VERSION" >> $GITHUB_ENV
echo "COPILOT_DISPLAY_VERSION=$DISPLAY_VERSION" >> $GITHUB_ENV

- name: Set up Java 21 (Temurin)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: 'maven'

- name: Cache Maven local repo
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install Copilot agent
working-directory: com.microsoft.copilot.eclipse.core/copilot-agent
run: |
npm install --force
cp -r node_modules/@github/copilot-language-server/dist ./dist

- name: Make mvnw executable
run: chmod +x ./mvnw

- name: Build (Tycho/Maven)
run: |
./mvnw -DskipTests -Dcheckstyle.skip=true clean verify

- name: Prepare build artifacts
run: |
mkdir -p build
SRC=com.microsoft.copilot.eclipse.repository/target/com.microsoft.copilot.eclipse.repository-${COPILOT_PLUGIN_VERSION}.zip
if [ ! -f "$SRC" ]; then
echo "ERROR: Expected ZIP not found at $SRC"
ls -la com.microsoft.copilot.eclipse.repository/target || true
exit 1
fi
if ! unzip -l "$SRC" | grep -qE 'content\.(jar|xml|xml\.xz)|p2\.index'; then
echo "ERROR: p2 repository ZIP is missing p2 metadata (content.jar / content.xml.xz / p2.index)"
unzip -l "$SRC"
exit 1
fi
find build/ -maxdepth 1 -name "github-copilot-for-anypoint-*.zip" -delete 2>/dev/null || true

# Create Windows-specific package (win32 only)
OUT_WIN=build/github-copilot-for-anypoint-${COPILOT_DISPLAY_VERSION}-win32.zip
unzip -q "$SRC" -d temp_win
rm -rf temp_win/plugins/*linux* temp_win/plugins/*macosx* temp_win/features/*linux* temp_win/features/*macosx* 2>/dev/null || true
cd temp_win && zip -q -r "../${OUT_WIN}" . && cd ..
rm -rf temp_win
sha256sum "$OUT_WIN" | awk '{print $1 " " $2}' > "${OUT_WIN}.sha256"

# Create macOS-specific package (macosx only)
OUT_MAC=build/github-copilot-for-anypoint-${COPILOT_DISPLAY_VERSION}-macos.zip
unzip -q "$SRC" -d temp_mac
rm -rf temp_mac/plugins/*linux* temp_mac/plugins/*win32* temp_mac/features/*linux* temp_mac/features/*win32* 2>/dev/null || true
cd temp_mac && zip -q -r "../${OUT_MAC}" . && cd ..
rm -rf temp_mac
sha256sum "$OUT_MAC" | awk '{print $1 " " $2}' > "${OUT_MAC}.sha256"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}
path: |
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-win32.zip
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-win32.zip.sha256
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-macos.zip
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-macos.zip.sha256

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.COPILOT_DISPLAY_VERSION }}"
name: "GitHub Copilot for Anypoint Studio - Windows & macOS v${{ env.COPILOT_DISPLAY_VERSION }}"
prerelease: true
generate_release_notes: true
body: |
Pre-release build of GitHub Copilot for Anypoint Studio.

**Installation in Anypoint Studio:**

Select the package appropriate for your platform:

- **Windows (64-bit)**: Download `github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-win32.zip`
- **macOS (Intel & Apple Silicon)**: Download `github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-macos.zip`

**Installation Steps:**
1. In Anypoint Studio, go to **Help → Install New Software...**
2. Click **Add...** and select the downloaded ZIP file as a local update site.
3. Follow the installation wizard and restart Anypoint Studio.

**Verification:**
Each package includes a `.sha256` file for integrity verification. Use `sha256sum -c file.zip.sha256` to verify the download.
files: |
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-win32.zip
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-win32.zip.sha256
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-macos.zip
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-macos.zip.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118 changes: 118 additions & 0 deletions .github/workflows/build-win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Build GitHub Copilot for Anypoint Studio (Windows)

on:
push:
branches: [ build/win ]
workflow_dispatch:

env:
MAVEN_OPTS: -Xmx2g

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Extract plugin version
run: |
VERSION=$(grep -oP '(?<=<copilot-plugin-version>)[^<]+' pom.xml)
TIMESTAMP=$(date -u +%Y%m%d%H%M%S)
DISPLAY_VERSION="${VERSION/-SNAPSHOT/-$TIMESTAMP}"
echo "COPILOT_PLUGIN_VERSION=$VERSION" >> $GITHUB_ENV
echo "COPILOT_DISPLAY_VERSION=$DISPLAY_VERSION" >> $GITHUB_ENV

- name: Set up Java 21 (Temurin)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: 'maven'

- name: Cache Maven local repo
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install Copilot agent
working-directory: com.microsoft.copilot.eclipse.core/copilot-agent
run: |
npm install --force
cp -r node_modules/@github/copilot-language-server/dist ./dist

- name: Make mvnw executable
run: chmod +x ./mvnw

- name: Build (Tycho/Maven)
run: |
./mvnw -DskipTests -Dcheckstyle.skip=true clean verify

- name: Prepare build artifacts
run: |
mkdir -p build
SRC=com.microsoft.copilot.eclipse.repository/target/com.microsoft.copilot.eclipse.repository-${COPILOT_PLUGIN_VERSION}.zip
if [ ! -f "$SRC" ]; then
echo "ERROR: Expected ZIP not found at $SRC"
ls -la com.microsoft.copilot.eclipse.repository/target || true
exit 1
fi
if ! unzip -l "$SRC" | grep -qE 'content\.(jar|xml|xml\.xz)|p2\.index'; then
echo "ERROR: p2 repository ZIP is missing p2 metadata (content.jar / content.xml.xz / p2.index)"
unzip -l "$SRC"
exit 1
fi
find build/ -maxdepth 1 -name "github-copilot-for-anypoint-*.zip" -delete 2>/dev/null || true

# Create Windows-specific package (win32 only)
OUT_WIN=build/github-copilot-for-anypoint-${COPILOT_DISPLAY_VERSION}-win32.zip
unzip -q "$SRC" -d temp_win
rm -rf temp_win/plugins/*linux* temp_win/plugins/*macosx* temp_win/features/*linux* temp_win/features/*macosx* 2>/dev/null || true
cd temp_win && zip -q -r "../${OUT_WIN}" . && cd ..
rm -rf temp_win
sha256sum "$OUT_WIN" | awk '{print $1 " " $2}' > "${OUT_WIN}.sha256"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}
path: |
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-win32.zip
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-win32.zip.sha256

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.COPILOT_DISPLAY_VERSION }}"
name: "GitHub Copilot for Anypoint Studio - Windows v${{ env.COPILOT_DISPLAY_VERSION }}"
prerelease: true
generate_release_notes: true
body: |
Pre-release build of GitHub Copilot for Anypoint Studio.

**Installation in Anypoint Studio:**

- **Windows (64-bit)**: Download `github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-win32.zip`

**Installation Steps:**
1. In Anypoint Studio, go to **Help → Install New Software...**
2. Click **Add...** and select the downloaded ZIP file as a local update site.
3. Follow the installation wizard and restart Anypoint Studio.

**Verification:**
Each package includes a `.sha256` file for integrity verification. Use `sha256sum -c file.zip.sha256` to verify the download.
files: |
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-win32.zip
build/github-copilot-for-anypoint-${{ env.COPILOT_DISPLAY_VERSION }}-win32.zip.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43 changes: 0 additions & 43 deletions .github/workflows/ci.yml

This file was deleted.

Loading
Loading