@@ -23,70 +23,70 @@ jobs:
2323 permissions :
2424 contents : write # for actions/upload-release-asset to upload release asset
2525 runs-on : macos-latest
26-
26+
2727 env :
2828 RELEASE_NAME : raylib-dev_macos
29-
29+
3030 steps :
3131 - name : Checkout
3232 uses : actions/checkout@master
33-
33+
3434 - name : Setup Release Version
3535 run : |
3636 echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_macos" >> $GITHUB_ENV
3737 shell : bash
3838 if : github.event_name == 'release' && github.event.action == 'published'
3939
4040 - name : Setup Environment
41- run : |
41+ run : |
4242 mkdir build
4343 cd build
4444 mkdir ${{ env.RELEASE_NAME }}
4545 cd ${{ env.RELEASE_NAME }}
4646 mkdir include
4747 mkdir lib
4848 cd ../..
49-
49+
5050 # Generating static + shared library, note that i386 architecture is deprecated
5151 # Defining GL_SILENCE_DEPRECATION because OpenGL is deprecated on macOS
5252 - name : Build Library
5353 run : |
5454 cd src
5555 clang --version
56-
56+
5757 # Extract version numbers from Makefile
5858 brew install grep
5959 RAYLIB_API_VERSION=`ggrep -Po 'RAYLIB_API_VERSION\s*=\s\K(.*)' Makefile`
6060 RAYLIB_VERSION=`ggrep -Po 'RAYLIB_VERSION\s*=\s\K(.*)' Makefile`
61-
61+
6262 # Build raylib x86_64 static
6363 make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
6464 mv libraylib.a /tmp/libraylib_x86_64.a
6565 make clean
66-
66+
6767 # Build raylib arm64 static
6868 make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B
6969 mv libraylib.a /tmp/libraylib_arm64.a
7070 make clean
71-
71+
7272 # Join x86_64 and arm64 static
7373 lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a /tmp/libraylib_x86_64.a /tmp/libraylib_arm64.a
74-
74+
7575 # Build raylib x86_64 dynamic
7676 make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target x86_64-apple-macos10.12" -B
7777 mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib
7878 make clean
79-
79+
8080 # Build raylib arm64 dynamic
8181 make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target arm64-apple-macos11" -B
8282 mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
83-
83+
8484 # Join x86_64 and arm64 dynamic
8585 lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
8686 ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.dylib
8787 ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_API_VERSION}.dylib
8888 cd ..
89-
89+
9090 - name : Generate Artifacts
9191 run : |
9292 cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
@@ -97,15 +97,15 @@ jobs:
9797 cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
9898 cd build
9999 tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
100-
100+
101101 - name : Upload Artifacts
102102 uses : actions/upload-artifact@v4
103103 with :
104104 name : ${{ env.RELEASE_NAME }}
105105 path : |
106106 ./build/${{ env.RELEASE_NAME }}
107107 !./build/${{ env.RELEASE_NAME }}.tar.gz
108-
108+
109109 - name : Upload Artifact to Release
110110 uses : softprops/action-gh-release@v1
111111 with :
0 commit comments