-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45d981a
commit fa1af67
Showing
1 changed file
with
71 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
name: CI | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ dev ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: windows-2019 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Install 7Zip PowerShell Module | ||
shell: powershell | ||
|
||
run: | | ||
# cancel early, if not build commit | ||
$strVal ='${{ github.event.commits[0].message }}' | ||
if($strVal -clike '*#TEST*') | ||
{ | ||
Write-Host 'True' | ||
} else { | ||
Write-Host 'False' | ||
exit(1) | ||
} | ||
Install-Module 7Zip4PowerShell -Force -Verbose | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Restore NuGet packages | ||
run: nuget restore UnityLauncherPro.sln | ||
|
||
- name: Build Binary | ||
shell: cmd | ||
run: call .\Build.cmd | ||
|
||
- name: Build Artifact | ||
shell: cmd | ||
run: call .\ArtifactBuild.cmd | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{github.run_number}} | ||
release_name: Release ${{github.run_number}} | ||
body: | | ||
Automated Release by GitHub Action CI | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./UnityLauncherPro.ZIP | ||
asset_name: UnityLauncherPro.ZIP | ||
asset_content_type: application/zip |