forked from Valkirie/HandheldCompanion
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'EAPublicMergeTest' of https://github.com/CasperH2O/Hand…
…heldCompanion into EAPublicMergeTest
- Loading branch information
Showing
120 changed files
with
49,033 additions
and
25,162 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 |
---|---|---|
|
@@ -14,6 +14,7 @@ labels: bug | |
- [ ] GPD | ||
- [ ] ONEXPLAYER | ||
- [ ] VALVE | ||
- [ ] LENOVO | ||
|
||
**Device model** | ||
Your device model | ||
|
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 |
---|---|---|
@@ -1,106 +1,110 @@ | ||
name: Build and Release HandheldCompanion | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
releaseVersion: | ||
description: 'Release version to create' | ||
required: false | ||
type: string | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: none | ||
id-token: none | ||
issues: none | ||
discussions: none | ||
packages: none | ||
pages: none | ||
pull-requests: write | ||
repository-projects: none | ||
security-events: none | ||
statuses: none | ||
|
||
jobs: | ||
build: | ||
name: Build and Release | ||
runs-on: windows-latest | ||
|
||
env: | ||
SOLUTION_NAME: HandheldCompanion | ||
INNO_VERSION: 6.2.2 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Validate Release | ||
if: inputs.releaseVersion != '' | ||
run: | | ||
if ('${{ inputs.releaseVersion }}' -notmatch '^\d+(?:\.\d+){3}$') { | ||
Write-Error "Version ${{ inputs.releaseVersion }} is not valid, please use format Major.Minor.Revision.Build" | ||
Exit 1 | ||
} | ||
if ('${{ github.ref }}' -ne 'refs/heads/main') { | ||
Write-Error "Release may only be created from main" | ||
Exit 1 | ||
} | ||
# This step sets release version in source control. Uses pwsh for lack of an available github action. | ||
- name: Set Release Version in Repo | ||
if: inputs.releaseVersion != '' | ||
run: | | ||
(Get-Content -Path ./HandheldCompanion.iss) -replace "#define MyAppVersion `'\d+(?:\.\d+){3}`'", "#define MyAppVersion '${{ inputs.releaseVersion }}'" | Out-File ./HandheldCompanion.iss | ||
(Get-Content -Path ./HandheldCompanion/HandheldCompanion.csproj) -replace "<Version>\d+(?:\.\d+){3}</Version>", "<Version>${{ inputs.releaseVersion }}</Version>" | Out-File ./HandheldCompanion/HandheldCompanion.csproj | ||
- name: Install Innosetup | ||
run: | | ||
choco install innosetup --version=${{ env.INNO_VERSION }} --force | ||
- name: Setup dotnet 8 SDK | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '8.x' | ||
|
||
- name: Restore Solution | ||
run: dotnet restore ${{ env.SOLUTION_NAME }}.sln | ||
|
||
- name: Build Solution | ||
run: dotnet build ${{ env.SOLUTION_NAME }}.sln /p:Configuration=Release | ||
|
||
- name: Create Installer | ||
run: | | ||
iscc.exe ${{ env.SOLUTION_NAME }}.iss | ||
- name: Create Release Pull Request | ||
if: inputs.releaseVersion != '' | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
branch: release/${{ inputs.releaseVersion }} | ||
title: 'Release ${{ inputs.releaseVersion }}' | ||
commit-message: 'Release ${{ inputs.releaseVersion }}' | ||
body: 'Release ${{ inputs.releaseVersion }}. Triggered by ${{ github.actor }}' | ||
|
||
- name: Create Release | ||
if: inputs.releaseVersion != '' | ||
uses: softprops/[email protected] | ||
with: | ||
body_path: .github/workflows/RELEASE_FORMAT.txt | ||
tag_name: ${{ inputs.releaseVersion }} | ||
name: "Build ${{ inputs.releaseVersion }}" | ||
draft: true | ||
fail_on_unmatched_files: true | ||
files: | | ||
./install/HandheldCompanion-${{ inputs.releaseVersion }}.exe | ||
name: Build and Release HandheldCompanion | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
releaseVersion: | ||
description: 'Release version to create' | ||
required: false | ||
type: string | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
permissions: | ||
actions: write | ||
checks: write | ||
contents: write | ||
deployments: none | ||
id-token: none | ||
issues: none | ||
discussions: none | ||
packages: none | ||
pages: none | ||
pull-requests: write | ||
repository-projects: none | ||
security-events: none | ||
statuses: none | ||
|
||
jobs: | ||
build: | ||
name: Build and Release | ||
runs-on: windows-latest | ||
|
||
env: | ||
SOLUTION_NAME: HandheldCompanion | ||
INNO_VERSION: 6.2.2 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Validate Release | ||
if: inputs.releaseVersion != '' | ||
run: | | ||
if ('${{ inputs.releaseVersion }}' -notmatch '^\d+(?:\.\d+){3}$') { | ||
Write-Error "Version ${{ inputs.releaseVersion }} is not valid, please use format Major.Minor.Revision.Build" | ||
Exit 1 | ||
} | ||
if ('${{ github.ref }}' -ne 'refs/heads/main') { | ||
Write-Error "Release may only be created from main" | ||
Exit 1 | ||
} | ||
# This step sets release version in source control. Uses pwsh for lack of an available github action. | ||
- name: Set Release Version in Repo | ||
if: inputs.releaseVersion != '' | ||
run: | | ||
(Get-Content -Path ./HandheldCompanion.iss) -replace "#define MyAppVersion `'\d+(?:\.\d+){3}`'", "#define MyAppVersion '${{ inputs.releaseVersion }}'" | Out-File ./HandheldCompanion.iss | ||
(Get-Content -Path ./HandheldCompanion/HandheldCompanion.csproj) -replace "<Version>\d+(?:\.\d+){3}</Version>", "<Version>${{ inputs.releaseVersion }}</Version>" | Out-File ./HandheldCompanion/HandheldCompanion.csproj | ||
- name: Install Innosetup | ||
run: | | ||
choco install innosetup --version=${{ env.INNO_VERSION }} --force | ||
- name: Setup dotnet 8 SDK | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '8.x' | ||
|
||
- name: Restore Solution | ||
run: dotnet restore ${{ env.SOLUTION_NAME }}.sln | ||
|
||
- name: Build Solution | ||
run: dotnet build ${{ env.SOLUTION_NAME }}.sln /p:Configuration=Release | ||
|
||
- name: Create Installer | ||
run: | | ||
iscc.exe ${{ env.SOLUTION_NAME }}.iss | ||
- name: Create Release Pull Request | ||
if: inputs.releaseVersion != '' | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
branch: release/${{ inputs.releaseVersion }} | ||
title: 'Release ${{ inputs.releaseVersion }}' | ||
commit-message: 'Release ${{ inputs.releaseVersion }}' | ||
body: 'Release ${{ inputs.releaseVersion }}. Triggered by ${{ github.actor }}' | ||
|
||
- name: Create Release | ||
if: inputs.releaseVersion != '' | ||
uses: softprops/[email protected] | ||
with: | ||
body_path: .github/workflows/RELEASE_FORMAT.txt | ||
tag_name: ${{ inputs.releaseVersion }} | ||
name: "Build ${{ inputs.releaseVersion }}" | ||
draft: true | ||
fail_on_unmatched_files: true | ||
files: | | ||
<<<<<<< HEAD | ||
./install/HandheldCompanion-${{ inputs.releaseVersion }}.exe | ||
======= | ||
./install/HandheldCompanion-${{ inputs.releaseVersion }}.exe | ||
>>>>>>> f8fea3c25fb5fd254f5020d43305b7356ec9770d |
Oops, something went wrong.