Skip to content

Update build.yml

Update build.yml #8

Workflow file for this run

name: UnknownKit
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: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022]
env:
BUILD_TYPE: Release
steps:
- name: Setup llvm-msvc
uses: NewWorldComingSoon/setup-llvm-msvc@v2
- name: Checkout
uses: actions/checkout@v2
- name: Install Static Qt
run: |
Invoke-WebRequest https://github.com/gmh5225/static-build-qt6/releases/download/qt6_630_static/qt6_630_static_64.zip -OutFile .\qt6_630_static_64.zip
expand-archive -path "qt6_630_static_64.zip"
- name: Build
run: |
cmake -TLLVM-MSVC_v143 -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install -DCMAKE_PREFIX_PATH=qt6_630_static_64 -B build
cmake --build build --config ${{ env.BUILD_TYPE }}
cmake --install build
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: UnknownKit-${{ matrix.os }}
path: install
- name: Get lowercase OS name
id: osname
uses: ASzc/change-string-case-action@v1
with:
string: ${{ runner.os }}
- name: Compress artifacts
uses: vimtor/action-zip@v1
with:
files: install/bin/
dest: ${{ github.event.repository.name }}-${{ steps.osname.outputs.lowercase }}.zip
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
files: ${{ github.event.repository.name }}-${{ steps.osname.outputs.lowercase }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}