-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (83 loc) · 2.87 KB
/
main-0.9.1.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: FF7Scarlet
run-name: 0.9.1.${{ github.run_number }}
on:
workflow_dispatch:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
env:
_IS_BUILD_CANARY: false
_IS_GITHUB_RELEASE: false
_RELEASE_NAME: FF7Scarlet
_RELEASE_VERSION: v0
_RELEASE_CONFIGURATION: Release
_BUILD_BRANCH: "${{ github.ref }}"
_BUILD_VERSION: "0.9.1.${{ github.run_number }}"
# GIT: Fix reporting from stderr to stdout
GIT_REDIRECT_STDERR: 2>&1
jobs:
FF7Scarlet:
runs-on: windows-latest
timeout-minutes: 1440
strategy:
max-parallel: 1
steps:
- name: Set Git Config
run: |
git config --global core.autocrlf false
git config --global core.filemode false
git config --global core.longpaths true
- name: Checkout
uses: actions/[email protected]
- name: Prepare Environment
run: ".github/workflows/prepare.ps1"
shell: pwsh
- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1
with:
version: "${{ env._BUILD_VERSION }}"
assemblyVersion: "${{ env._BUILD_VERSION }}"
fileVersion: "${{ env._BUILD_VERSION }}"
informationalVersion: "${{ env._BUILD_VERSION }}"
- name: Restore NuGet Packages
run: nuget restore ${{ github.workspace }}\src\${{ env._RELEASE_NAME }}.sln
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Run MSBuild
run: msbuild ${{ github.workspace }}\src\${{ env._RELEASE_NAME }}.sln /p:WindowsTargetPlatformVersion=10.0.19041.0 /m -p:Configuration=${{ env._RELEASE_CONFIGURATION }} -p:Platform="Any CPU"
- name: Package the release
run: ".github/workflows/package.ps1"
shell: pwsh
- name: Publish PR artifacts
if: env._IS_GITHUB_RELEASE == 'false' && success()
uses: actions/[email protected]
with:
name: "${{ env._RELEASE_NAME }}-${{ env._RELEASE_VERSION }}"
path: ".dist/*.zip"
- name: Publish Canary release
uses: ncipollo/release-action@v1
if: env._IS_GITHUB_RELEASE == 'true' && env._IS_BUILD_CANARY == 'true' && success()
with:
artifacts: ".dist/*.zip"
allowUpdates: true
generateReleaseNotes: true
prerelease: true
removeArtifacts: true
tag: canary
name: "${{ env._RELEASE_NAME }}-${{ env._RELEASE_VERSION }}"
body: |
This is a canary build. Please be aware it may be prone to crashing and is NOT tested by anyone. Use this build AT YOUR OWN RISK!
- name: Publish Stable release
uses: ncipollo/release-action@v1
if: env._IS_GITHUB_RELEASE == 'true' && env._IS_BUILD_CANARY == 'false' && success()
with:
artifacts: ".dist/*.zip"
generateReleaseNotes: true
makeLatest: true
removeArtifacts: true
name: "${{ env._RELEASE_NAME }}-${{ env._RELEASE_VERSION }}"