build-sdl3 #116
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-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 }} | |
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 | |
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}" |