Update Release.yml #7
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 | |
jobs: | |
build: | |
name: ${{ matrix.os }} Release | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- if: ${{matrix.os == 'ubuntu-latest'}} | |
name: Update packages | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: libglfw3-dev gcc-multilib g++-multilib libvulkan-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev | |
version: 1.0 | |
- if: ${{ matrix.os == 'windows-latest' }} | |
name: Install Vulkan SDK | |
uses: humbletim/setup-vulkan-sdk@v1.2.0 | |
with: | |
vulkan-query-version: 1.3.204.0 | |
vulkan-components: Vulkan-Headers, Vulkan-Loader | |
vulkan-use-cache: true | |
- if: ${{matrix.os == 'ubuntu-latest'}} | |
name: Configure for linux | |
run: > | |
cmake -B build | |
-DCMAKE_BUILD_TYPE=Release | |
-DCMAKE_CXX_COMPILER=g++ | |
-DCMAKE_C_COMPILER=gcc | |
- if: ${{matrix.os == 'windows-latest'}} | |
name: Configure for windows | |
run: > | |
cmake -B build | |
-G "MinGW Makefiles" | |
-DCMAKE_BUILD_TYPE=Release | |
-DCMAKE_CXX_COMPILER=g++ | |
-DCMAKE_C_COMPILER=gcc | |
- name: Build release | |
run: cmake --build build --config Release | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }} | |
path: build/**/FileToByte* | |
release: | |
name: Release | |
runs-on: [ubuntu-latest] | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Linux Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ubuntu-latest | |
- name: Download Windows Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: windows-latest | |
- name: Release Build | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Release | |
tag_name: ${{ github.run_id }} | |
body: | | |
**This release has been built by Github Actions** | |
[Link to build](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
files: | | |
FileToByte | |
FileToByte.exe |