Skip to content

Implement Continuous Integration and Automatic Releases #6

Implement Continuous Integration and Automatic Releases

Implement Continuous Integration and Automatic Releases #6

Workflow file for this run

name: Build
on:
push:
tags: [ "v*" ]
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: ${{ startsWith(github.ref, 'refs/tags/') }}
matrix:
os: [macos-latest, windows-latest]
env:
BUILD_TYPE: RelWithDebInfo
steps:
- name: Configure Xcode
if: runner.os == 'MacOS'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure CMake
shell: bash
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -B build
- name: Build
shell: bash
run: cmake --build build --config $BUILD_TYPE
- name: Upload
uses: actions/upload-artifact@v4
with:
path: dist/
name: built-plugins-${{ matrix.os }}
release:
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download binaries
uses: actions/download-artifact@v4
with:
pattern: built-plugins-*
merge-multiple: true
- name: Extract release notes
run: git cat-file tag ${{ github.ref }} | tail -n +3 > changelog.md
- name: Attach binaries to release
uses: softprops/action-gh-release@v2
with:
body_path: changelog.md
files: dist/*