Port Qt plugin to CMake #11
This file contains hidden or 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: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
# Skip building pull requests from the same repository | |
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }} | |
runs-on: windows-2022 | |
permissions: | |
contents: write # Allow job to create a release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c # v1.3.1 | |
- name: Build (x64) | |
run: | | |
mkdir package\x64\plugins | |
cmake -B build64 -A x64 | |
cmake --build build64 --config Release | |
copy build64\Release\*.dp64 package\x64\plugins\ | |
- name: Build (x32) | |
run: | | |
mkdir package\x32\plugins | |
cmake -B build32 -A Win32 | |
cmake --build build32 --config Release | |
copy build32\Release\*.dp32 package\x32\plugins\ | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}-${{ github.sha }} | |
path: package/ | |
- name: Compress artifacts | |
uses: vimtor/action-zip@26a249fb00d43ca98dad77a4b3838025fc226aa1 # v1.1 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
with: | |
files: package/ | |
dest: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip | |
- name: Release | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
with: | |
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') || contains(github.ref, '-pre') }} | |
files: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip | |
generate_release_notes: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |