portability/.github/workflows/release.yml

59 lines
1.9 KiB
YAML
Raw Normal View History

2020-08-26 09:51:56 +10:00
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', 'UWP nightly']
2020-08-26 09:51:56 +10:00
include:
2020-09-20 13:12:12 +10:00
- name: macOS stable
2020-08-26 09:51:56 +10:00
os: macos-10.15
2020-09-20 13:12:12 +10:00
target: x86_64-apple-darwin
package: gfx-portability.zip
2020-09-20 13:12:12 +10:00
- name: iOS stable
os: macos-10.15
target: aarch64-apple-ios
package: gfx-portability.zip
2020-09-20 13:12:12 +10:00
- name: Windows stable
2020-08-26 09:51:56 +10:00
os: windows-2019
2020-09-20 13:12:12 +10:00
target: x86_64-pc-windows-msvc
package: gfx-portability.zip
- name: UWP nightly
os: windows-2019
target: x86_64-uwp-windows-msvc
package: gfx-portability-custom.zip
2020-08-26 09:51:56 +10:00
steps:
- uses: actions/checkout@v2
- if: matrix.os == 'windows-2019'
name: Install make
run: choco install make
- if: matrix.package == 'gfx-portability.zip'
name: Install target
run: rustup target add ${{ matrix.target }}
- if: matrix.package == 'gfx-portability-custom.zip'
name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src
2020-09-20 13:12:12 +10:00
- name: Build
run: make CARGO_BUILD_TARGET=${{ matrix.target }} ${{ matrix.package }}
2020-08-26 09:51:56 +10:00
- 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: ./${{ matrix.package }}
2020-09-20 13:12:12 +10:00
asset_name: gfx-portability-${{ github.event.release.tag_name }}.${{ matrix.target }}.zip
2020-08-26 09:51:56 +10:00
asset_content_type: application/zip