Update to same license as tutorial #40
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: Builds | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: [ "main" ] | |
tags: 'v*' | |
paths-ignore: | |
- 'doc/**' | |
- '.github/**' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
linuxXlinux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install -y build-essential xorg-dev mesa-common-dev libx11-dev libxrandr-dev libsndfile1-dev libudev-dev libxinerama-dev libxcursor-dev xvfb x11-apps vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools | |
- name: linux-linux | |
run: | | |
./build.sh -r | |
mkdir linux-x86_64 | |
chmod +x build/HelloVK | |
cp build/HelloVK linux-x86_64/HelloVK-linux-x86_64 | |
cp build/*.spv linux-x86_64/ | |
cp LICENSE linux-x86_64/ | |
- name: buildArtifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux-x86_64 | |
path: linux-x86_64 | |
linuxXwindows: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev | |
- name: linux-X-windows | |
run: | | |
./build.sh -w -r | |
mkdir windows | |
chmod +x build/HelloVK.exe | |
cp build/HelloVK.exe windows/ | |
cp build/*.spv windows/ | |
cp build/*.dll windows/ | |
cp LICENSE windows/ | |
- name: buildArtifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows | |
path: windows | |
release: | |
needs: [linuxXlinux, linuxXwindows] | |
if: github.ref_type == 'tag' | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: get linux build | |
uses: actions/download-artifact@v3 | |
with: | |
name: linux-x86_64 | |
- name: pack linux build | |
run: | | |
ls | |
zip linux-x86_64.zip ./* | |
- name: get windows build | |
uses: actions/download-artifact@v3 | |
with: | |
name: windows | |
- name: pack windows | |
run: zip windows.zip HelloVK.exe LICENSE *.spv *.dll | |
# https://github.com/softprops/action-gh-release | |
- name: release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
prerelease: true | |
name: "release-${{ github.ref_name }}" | |
tag_name: ${{ github.ref }} | |
files: | | |
linux-x86_64.zip | |
windows.zip |