UMVC.Editor & UMVC.Core Release #112
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: UMVC.Editor & UMVC.Core Release | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: {} | |
jobs: | |
Build_UMVC_Editor: | |
name: Build UMVC.Editor 🏗️ | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- name: Wait for build to succeed | |
uses: fountainhead/action-wait-for-check@v1.1.0 | |
id: wait-for-build | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
checkName: Build UMVC.Core 🏗️ | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Is UMVC.Core failing? | |
if: ${{ steps.wait-for-build.outputs.conclusion == 'failure' }} | |
run: echo "::error There is a problem with your UMVC.Core build! Exiting!!" && exit 1 | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install python3-pip unzip curl -y && pip install requests | |
- name: Download UMVC.Core Build | |
run: python .github/workflows/scripts/downloadArtifacts.py ${{ secrets.PERSONAL_TOKEN }} | |
- name: Unzip and move UMVC.Core dlls | |
run: sh .github/workflows/scripts/install-umvc.editor-deps.sh | |
- name: Delete Tests directory | |
run: rm -rf Assets/UMVC.Tests | |
- name: Create UMVC.Editor.PreBuiltDlls.unitypackage with prebundled UMVC.Core | |
uses: game-ci/unity-builder@v3 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
with: | |
unityVersion: 2021.3.30f1 | |
versioning: None | |
buildMethod: UMVC.Export.UMVCPackageExport.ExportWithPreBuiltDlls | |
- uses: actions/upload-artifact@v3 | |
name: Upload UMVC.Editor.PreBuiltDlls.unitypackage | |
with: | |
name: UMVC.Editor.PreBuiltDlls.unitypackage | |
path: ./UMVC.Editor.PreBuiltDlls.unitypackage | |
- name: Create UMVC.Editor.MsBuildForUnity.unitypackage with unbundled UMVC.Core | |
uses: game-ci/unity-builder@v3 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
with: | |
unityVersion: 2021.3.30f1 | |
versioning: None | |
buildMethod: UMVC.Export.UMVCPackageExport.ExportWithMsBuildForUnity | |
- uses: actions/upload-artifact@v3 | |
name: Upload UMVC.Editor.MsBuildForUnity.unitypackage | |
with: | |
name: UMVC.Editor.MsBuildForUnity.unitypackage | |
path: ./UMVC.Editor.MsBuildForUnity.unitypackage | |
Release_UMVC: | |
name: Release UMVC 📦 | |
runs-on: ubuntu-latest | |
needs: Build_UMVC_Editor | |
if: "!contains(github.event.head_commit.message, '[skip ci]') && github.ref == 'refs/heads/master'" | |
steps: | |
- uses: actions/checkout@v3 | |
- run: git fetch --prune --unshallow --tags | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v0 | |
with: | |
versionSpec: '5.x' | |
- name: Determine Version | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v0 | |
- name: 📦 Zip UMVC.Core Sources | |
run: zip -r UMVC.Core.${{ steps.gitversion.outputs.semVer }}.zip UMVC.Core | |
- name: Download UMVC.Editor.MsBuildForUnity.unitypackage | |
uses: actions/download-artifact@v3 | |
with: | |
name: UMVC.Editor.MsBuildForUnity.unitypackage | |
- name: Download UMVC.Editor.PreBuiltDlls.unitypackage | |
uses: actions/download-artifact@v3 | |
with: | |
name: UMVC.Editor.PreBuiltDlls.unitypackage | |
- name: Change assets names for release ${{ steps.gitversion.outputs.semVer }} | |
run: | | |
mv UMVC.Editor.MsBuildForUnity.unitypackage UMVC.Editor.MsBuildForUnity.${{ steps.gitversion.outputs.semVer }}.unitypackage | |
mv UMVC.Editor.PreBuiltDlls.unitypackage UMVC.Editor.PreBuiltDlls.${{ steps.gitversion.outputs.semVer }}.unitypackage | |
- name: 🚀 Create GitHub release | |
uses: softprops/action-gh-release@v1 | |
id: create_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.UMVC_PUSH_TAG_PAT }} | |
with: | |
tag_name: v${{ steps.gitversion.outputs.semVer }} | |
body: | | |
# Changes in release v${{ steps.gitversion.outputs.semVer }} | |
files: | | |
UMVC.Core.${{ steps.gitversion.outputs.semVer }}.zip | |
UMVC.Editor.PreBuiltDlls.${{ steps.gitversion.outputs.semVer }}.unitypackage | |
UMVC.Editor.MsBuildForUnity.${{ steps.gitversion.outputs.semVer }}.unitypackage | |
draft: false | |
prerelease: false | |
generate_release_notes: true |