Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tmk907 committed Jan 15, 2023
1 parent 81e6c81 commit de4cf87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
input_app_version:
description: 'Application version'
required: true
type: string
default: '1.0.0'

jobs:
Expand All @@ -33,10 +34,10 @@ jobs:
- name: Change Version
run: |
# Get current version code and increment
$manifestPath = 'RacingCarsControllerAndroid/AndroidManifest.xml'
$manifestPath = "$env:Project_Directory/AndroidManifest.xml"
$csprojPath = $env:Project_Path
$newVersionCode = git rev-list HEAD --count
$newVersionName = ${{ inputs.input_app_version }}
$csprojPath = $env:Project_Path
# Update manifest
(Get-Content $manifestPath) -Replace 'android:versionCode="\d+"', "android:versionCode=`"${newVersionCode}`"" | Set-Content $manifestPath
Expand All @@ -46,7 +47,6 @@ jobs:
(Get-Content $csprojPath) -Replace '<ApplicationVersion>\d+</ApplicationVersion>', "<ApplicationVersion>$newVersionCode</ApplicationVersion>" | Set-Content $csprojPath
(Get-Content $csprojPath) -Replace '<ApplicationDisplayVersion>[\w\d.-]+</ApplicationDisplayVersion>', "<ApplicationDisplayVersion>$newVersionName</ApplicationDisplayVersion>" | Set-Content $csprojPath
Write-Host "New versionName: $newVersionName, new versionCode: $newVersionCode"
- name: Setup .NET 7
uses: actions/setup-dotnet@v2
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ inputs.input_app_version }}
tag: android-v${{ inputs.input_app_version }}
name: Release Android ${{ inputs.input_app_version }}
artifacts: "./*.apk"
generateReleaseNotes: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/winui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:
uses: ncipollo/release-action@v1
if: matrix.ChannelName == 'Prod_Sideload'
with:
tag: ${{ env.App_Version }}
tag: desktop-v${{ env.App_Version }}
name: Release Desktop ${{ env.App_Version }}
artifacts: "./*.msix,./*.cer"
generateReleaseNotes: true
Expand Down

0 comments on commit de4cf87

Please sign in to comment.