Skip to content

docs: update changelog for 2.6.0 #77

docs: update changelog for 2.6.0

docs: update changelog for 2.6.0 #77

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*'
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: npm ci
- name: Download restic binary
run: npm run download-restic -- --current
# Build SolidWorks service if SolidWorks is installed on the runner
# This will fail on GitHub-hosted runners (no SolidWorks), but works on self-hosted runners
- name: Build SolidWorks Service
id: sw-service
continue-on-error: true
run: |
dotnet build solidworks-addin/BluePLM.SolidWorksService -c Release
- name: Copy SolidWorks Service to resources
if: steps.sw-service.outcome == 'success'
run: |
New-Item -ItemType Directory -Force -Path resources/bin/win32
Copy-Item solidworks-addin/BluePLM.SolidWorksService/bin/Release/*.exe resources/bin/win32/
Copy-Item solidworks-addin/BluePLM.SolidWorksService/bin/Release/*.dll resources/bin/win32/
Write-Host "SolidWorks service copied to resources/bin/win32"
- name: Build Electron app
run: npm run build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: windows-build
path: |
release/*.exe
release/latest.yml
if-no-files-found: warn
build-macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Download restic binary
run: npm run download-restic -- --current
- name: Build Electron app
run: npm run build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload macOS artifacts
uses: actions/upload-artifact@v4
with:
name: macos-build
path: |
release/*.dmg
release/latest-mac.yml
if-no-files-found: warn
release:
needs: [build-windows, build-macos]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Windows artifacts
uses: actions/download-artifact@v4
with:
name: windows-build
path: dist/windows
- name: Download macOS artifacts
uses: actions/download-artifact@v4
with:
name: macos-build
path: dist/macos
- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Extract changelog for version
id: changelog
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
# Extract the section for this version from CHANGELOG.md
# Finds content between ## [VERSION] and the next ## [ or end of file
CHANGELOG=$(awk "/^## \[${VERSION}\]/{flag=1; next} /^## \[/{flag=0} flag" CHANGELOG.md)
# Handle multi-line output for GitHub Actions
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.changelog.outputs.CHANGELOG }}
draft: false
prerelease: false
files: |
dist/windows/*
dist/macos/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}