portability/.github/workflows/release.yml
2020-09-19 23:12:22 -04:00

45 lines
1.3 KiB
YAML

on:
release:
types: [published]
name: Release
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: ['macOS stable', 'iOS stable', 'Windows stable']
include:
- name: macOS stable
os: macos-10.15
target: x86_64-apple-darwin
- name: iOS stable
os: macos-10.15
target: aarch64-apple-ios
- name: Windows stable
os: windows-2019
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v2
- if: matrix.os == 'windows-2019'
name: Install make
run: choco install make
- run: rustup target add ${{ matrix.target }}
- name: Build
env:
CARGO_BUILD_TARGET: $${ matrix.target }
run: make gfx-portability.zip
- name: Upload builds
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./gfx-portability.zip
asset_name: gfx-portability-${{ github.event.release.tag_name }}.${{ matrix.target }}.zip
asset_content_type: application/zip