Merge pull request #951 from osm/fix-gitignore #232
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: build and deploy snapshots | |
on: [push] | |
jobs: | |
windows-build: | |
if: github.repository == 'QW-Group/ezquake-source' | |
runs-on: windows-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
- name: Run CMake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: msbuild-x64 | |
buildPreset: msbuild-x64-release | |
- name: Create checksum | |
run: | | |
md5sum ezquake.exe > ezquake.md5 | |
- name: Setup SSH | |
env: | |
SSH_AUTH_SOCK: C:\ssh_agent.sock | |
shell: msys2 {0} | |
run: | | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" | |
- name: Set date | |
shell: msys2 {0} | |
run: | | |
export TZ=CET-1CEST | |
echo "DATE=$(date "+%Y%m%d-%H%M%S")" >> $GITHUB_ENV | |
- name: Deploy | |
env: | |
SSH_AUTH_SOCK: C:\ssh_agent.sock | |
shell: msys2 {0} | |
run: | | |
mkdir -p upload/snapshots/windows/${{ matrix.platform }}/${{ matrix.config }} | |
mkdir -p upload/snapshots/latest/windows/${{ matrix.platform }}/${{ matrix.config }} | |
cp ezquake.exe upload/snapshots/windows/${{ matrix.platform }}/${{ matrix.config }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezquake.exe | |
cp ezquake.md5 upload/snapshots/windows/${{ matrix.platform }}/${{ matrix.config }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezquake.md5 | |
cp ezquake.exe upload/snapshots/latest/windows/${{ matrix.platform }}/${{ matrix.config }}/ezquake.exe | |
cp ezquake.md5 upload/snapshots/latest/windows/${{ matrix.platform }}/${{ matrix.config }}/ezquake.md5 | |
sftp -rp -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile /dev/null' -P ${{ secrets.SFTP_PORT }} ${{ secrets.SFTP_USERNAME }}@${{ secrets.SFTP_HOST }}:/snapshots <<< $'put -rp upload/snapshots/*' | |
linux-build: | |
if: github.repository == 'QW-Group/ezquake-source' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [linux-x86_64] | |
include: | |
- target: linux-x86_64 | |
platform: x86_64 | |
container: | |
image: debian:testing | |
options: --privileged | |
steps: | |
- name: Install dependencies | |
run: apt-get -qy update && apt-get -qy install curl file libfuse2 git make sudo git ssh-client | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build | |
run: git config --global --add safe.directory $PWD && ./misc/appimage/appimage-manual_creation.sh | |
- name: Build | |
run: ./misc/appimage/appimage-manual_creation.sh | |
- name: Create checksum | |
run: | | |
md5sum ezQuake-${{ matrix.platform }}.AppImage > ezQuake-${{ matrix.platform }}.AppImage.md5 | |
- name: Setup SSH | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
shell: bash | |
run: | | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" | |
- name: Set date | |
shell: bash | |
run: | | |
export TZ=CET-1CEST | |
echo "DATE=$(date "+%Y%m%d-%H%M%S")" >> $GITHUB_ENV | |
- name: Deploy | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
shell: bash | |
run: | | |
mkdir -p upload/snapshots/linux/${{ matrix.platform }} | |
mkdir -p upload/snapshots/latest/linux/${{ matrix.platform }} | |
cp ezQuake-${{ matrix.platform }}.AppImage upload/snapshots/linux/${{ matrix.platform }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezQuake-${{ matrix.platform }}.AppImage | |
cp ezQuake-${{ matrix.platform }}.AppImage.md5 upload/snapshots/linux/${{ matrix.platform }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezQuake-${{ matrix.platform }}.AppImage.md5 | |
cp ezQuake-${{ matrix.platform }}.AppImage upload/snapshots/latest/linux/${{ matrix.platform }}/ezQuake-${{ matrix.platform }}.AppImage | |
cp ezQuake-${{ matrix.platform }}.AppImage.md5 upload/snapshots/latest/linux/${{ matrix.platform }}/ezQuake-${{ matrix.platform }}.AppImage.md5 | |
sftp -rp -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile /dev/null' -P ${{ secrets.SFTP_PORT }} ${{ secrets.SFTP_USERNAME }}@${{ secrets.SFTP_HOST }}:/snapshots <<< $'put -rp upload/snapshots/*' |