maybe #167
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master, github-workflow-test ] | |
tags: | |
- 'v*.*.*' | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Create Release | |
id: create_release | |
if: startsWith(github.ref, 'refs/tags/') # Only release when a tag is pushed | |
uses: actions/create-release@v1 | |
with: | |
draft: false | |
prerelease: false | |
release_name: Automated Release ${{ github.ref }} | |
tag_name: ${{ github.ref }} | |
body: This is an automated release for ${{ github.ref }}`. | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
build: | |
runs-on: self-hosted | |
strategy: | |
matrix: | |
version: | |
- {major: 4, minor: 24} | |
- {major: 4, minor: 25} | |
- {major: 4, minor: 26} | |
- {major: 4, minor: 27} | |
- {major: 5, minor: 0} | |
- {major: 5, minor: 1} | |
- {major: 5, minor: 2} | |
- {major: 5, minor: 3} | |
steps: | |
- uses: actions/[email protected] | |
- name: Run Setup Script | |
run: C:\msys64\msys2_shell.cmd -defterm -here -no-start -mingw64 -shell bash setup.sh | |
- name: Package for Unreal Engine | |
run: python package.py "$env:UE_${{ matrix.version.major }}.${{ matrix.version.minor }}" "$env:RUNNER_TEMP" | |
- name: Upload Build-Artifact | |
if: startsWith(github.ref, 'refs/heads/') # Upload artifacts when commits (not tags) are pushed | |
uses: actions/[email protected] | |
with: | |
name: UnrealLibretro-${{ matrix.version.major }}.${{ matrix.version.minor }} | |
path: ${{ runner.temp }}/UnrealLibretro-${{ matrix.version.major }}.${{ matrix.version.minor }} | |
if-no-files-found: error | |
- name: Upload Release Asset | |
id: upload-release-asset | |
if: startsWith(github.ref, 'refs/tags/') # Only release when a tag is pushed | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ runner.temp }}/UnrealLibretro-${{ matrix.version.major }}.${{ matrix.version.minor }}.zip | |
asset_name: UnrealLibretro-${{ matrix.version.major }}.${{ matrix.version.minor }}.zip | |
asset_content_type: application/zip |