Skip to content

Automation: Add Chocolatey #22

Automation: Add Chocolatey

Automation: Add Chocolatey #22

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install needed packages
run: |
sudo apt install cmake clang-15 qt6-base-dev libglx-dev libgl1-mesa-dev libxkbcommon-dev -y
- name: Build
run: mkdir build && cd build && cmake .. && make -j$(nproc)
- name: Push binaries
uses: actions/upload-artifact@v2
with:
name: linux-binaries
path: build/DesktopZephyr
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Test
run: echo HI!
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Chocolatey
shell: pwsh
run: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- name: Install MinGw
run: choco install mingw
- name: Set up Qt
uses: jurplel/install-qt-action@v3
with:
qmake-version: '6'
cmake-args: '-DCMAKE_PREFIX_PATH=C:/Qt/6.x/mingw81_64'
- name: Configure and build
run: |
mkdir build
cd build
cmake ..
cmake --build .
- name: Push binaries
uses: actions/upload-artifact@v2
with:
name: windows-binaries
path: build/DesktopZephyr.exe
upload_release:
runs-on: ubuntu-latest
needs: [build_linux, build_windows]
steps:
- name: Download artifacts (Linux)
uses: actions/download-artifact@v2
with:
name: linux-binaries
path: artifacts/
- name: Download artifacts (Windows)
uses: actions/download-artifact@v2
with:
name: windows-binaries
path: artifacts/
- name: Test
run: ls -lh
- name: Upload
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: artifacts/*
tag_name: latest-nightly
release_name: Latest ~${{ github.run_number }}
body: Automated release from GitHub Actions