Skip to content

ci: add GitHub Actions release workflow for multi-platform builds #1

ci: add GitHub Actions release workflow for multi-platform builds

ci: add GitHub Actions release workflow for multi-platform builds #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build-macos:
strategy:
matrix:
include:
- runner: macos-13
arch: x64
- runner: macos-latest
arch: arm64
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build macOS binary
run: python build_binaries.py darwin
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: darwin-${{ matrix.arch }}
path: bin/darwin/docugenius-cli
retention-days: 1
package-and-release:
needs: build-macos
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Compile
run: npm run compile
- name: Download macOS x64 binary
uses: actions/download-artifact@v4
with:
name: darwin-x64
path: bin/darwin-x64/
- name: Download macOS arm64 binary
uses: actions/download-artifact@v4
with:
name: darwin-arm64
path: bin/darwin-arm64/
- name: Create macOS universal binary
run: |
mkdir -p bin/darwin
lipo -create bin/darwin-x64/docugenius-cli bin/darwin-arm64/docugenius-cli -output bin/darwin/docugenius-cli
chmod +x bin/darwin/docugenius-cli
file bin/darwin/docugenius-cli
- name: Verify Windows batch script exists
run: test -f bin/win32/docugenius-cli.bat
- name: Install vsce
run: npm install -g @vscode/vsce
- name: Package extension
run: vsce package
- name: Upload GitHub Release
uses: softprops/action-gh-release@v2
with:
files: '*.vsix'
generate_release_notes: true