Merge branch 'main' of https://github.com/4silvertooth/sciter-pdf #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
env: | |
BUILD_TYPE: Release | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies (ubuntu only) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Upload .dll file (if any exists) | |
if: ${{ matrix.os == 'windows-latest' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sciter-pdf.dll | |
path: build/Release/*.dll | |
retention-days: 1 | |
- name: Upload .so file (if any exists) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sciter-pdf.so | |
path: build/*.so | |
retention-days: 1 | |
- name: Upload .dylib file (if any exists) | |
if: ${{ matrix.os == 'macos-latest' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sciter-pdf.dylib | |
path: build/*.dylib | |
retention-days: 1 | |
release: | |
name: "Prelease" | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
# We don't need the repo, grab all artifacts from the build stage | |
# The plugin puts each artifact in a folder of `artifactname` | |
- uses: actions/download-artifact@v3 | |
- name: Display fetched artifacts | |
run: ls -R | |
- name: Emit a Github Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: true | |
title: "Development Build" | |
files: | | |
sciter-pdf.dll | |
sciter-pdf.so | |
sciter-pdf.dylib |