-
Notifications
You must be signed in to change notification settings - Fork 8
71 lines (59 loc) · 2.63 KB
/
build-sdl3.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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}"