Update macos.yml

This commit is contained in:
Ray 2020-08-19 17:20:44 +02:00 committed by GitHub
parent 33002a9e91
commit dfb1460236
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,10 @@
name: macOS
on: [push, pull_request]
on:
push:
pull_request:
release:
types: [published]
jobs:
build:
@ -25,6 +29,7 @@ jobs:
# Generating static + shared library, note that i386 architecture is deprecated
# Defining GL_SILENCE_DEPRECATION because OpenGL is deprecated on macOS
# TODO: Support Universal ARCH libraries (build arm64 + x86_64 and merge)
- name: Build Library
run: |
cd src
@ -45,3 +50,14 @@ jobs:
with:
name: ${{ env.RELEASE_NAME }}.tar.gz
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/${{ env.RELEASE_NAME }}.zip
asset_name: ${{ env.RELEASE_NAME }}.zip
asset_content_type: application/zip
if: github.event_name == 'release' && github.event.action == 'published'