Skip to content

build-sdl3

build-sdl3 #132

Workflow file for this run

name: build-sdl3
on:
schedule:
- cron: "0 0 * * 0"
push:
branches:
- main
jobs:
build:
runs-on: windows-2022
strategy:
matrix:
arch: [x64, arm64]
outputs:
OUTPUT_DATE: ${{ steps.build.outputs.OUTPUT_DATE }}
SDL_COMMIT: ${{ steps.build.outputs.SDL_COMMIT }}
SDL_IMAGE_COMMIT: ${{ steps.build.outputs.SDL_IMAGE_COMMIT }}
SDL_MIXER_COMMIT: ${{ steps.build.outputs.SDL_MIXER_COMMIT }}
SDL_TTF_COMMIT: ${{ steps.build.outputs.SDL_TTF_COMMIT }}
SDL_RTF_COMMIT: ${{ steps.build.outputs.SDL_RTF_COMMIT }}
SDL_NET_COMMIT: ${{ steps.build.outputs.SDL_NET_COMMIT }}
SDL_SHADERCROSS_COMMIT: ${{ steps.build.outputs.SDL_SHADERCROSS_COMMIT }}
SDL2_COMPAT_COMMIT: ${{ steps.build.outputs.SDL2_COMPAT_COMMIT }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: build
id: build
shell: cmd
run: call build.cmd ${{ matrix.arch }}
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: SDL3-${{ matrix.arch }}-${{ steps.build.outputs.OUTPUT_DATE }}
path: SDL3-${{ matrix.arch }}-${{ steps.build.outputs.OUTPUT_DATE }}.zip
if-no-files-found: error
compression-level: 0
release:
runs-on: ubuntu-24.04
needs: build
permissions:
contents: write
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: release
run: |
echo '[SDL commit](https://github.com/libsdl-org/SDL/commit/${{ needs.build.outputs.SDL_COMMIT }})' >>notes.txt
echo '[SDL_image commit](https://github.com/libsdl-org/SDL_image/commit/${{ needs.build.outputs.SDL_IMAGE_COMMIT }})' >>notes.txt
echo '[SDL_mixer commit](https://github.com/libsdl-org/SDL_mixer/commit/${{ needs.build.outputs.SDL_MIXER_COMMIT }})' >>notes.txt
echo '[SDL_ttf commit](https://github.com/libsdl-org/SDL_ttf/commit/${{ needs.build.outputs.SDL_TTF_COMMIT }})' >>notes.txt
echo '[SDL_rtf commit](https://github.com/libsdl-org/SDL_rtf/commit/${{ needs.build.outputs.SDL_RTF_COMMIT }})' >>notes.txt
echo '[SDL_net commit](https://github.com/libsdl-org/SDL_net/commit/${{ needs.build.outputs.SDL_NET_COMMIT }})' >>notes.txt
echo '[SDL_shadercross commit](https://github.com/libsdl-org/SDL_shadercross/commit/${{ needs.build.outputs.SDL_SHADERCROSS_COMMIT }})' >>notes.txt
echo '[SDL2_compat commit](https://github.com/libsdl-org/sdl2-compat/commit/${{ needs.build.outputs.SDL2_COMPAT_COMMIT }})' >>notes.txt
gh release create ${{ needs.build.outputs.OUTPUT_DATE }} -R "${GITHUB_REPOSITORY}" -t '${{ needs.build.outputs.OUTPUT_DATE }}' -F notes.txt
- name: get artifacts
uses: actions/download-artifact@v4
with:
pattern: SDL3-*-${{ needs.build.outputs.OUTPUT_DATE }}
merge-multiple: true
- name: upload artifacts
run: gh release upload '${{ needs.build.outputs.OUTPUT_DATE }}' SDL3-*-${{ needs.build.outputs.OUTPUT_DATE }}.zip -R "${GITHUB_REPOSITORY}"