Add installation counter via an asset text file
parent
e810f26f6d
commit
9aba5f1e05
|
@ -98,6 +98,8 @@ jobs:
|
|||
cd Policies
|
||||
zip -r ../WAU_ADMX.zip *
|
||||
cd ..
|
||||
# Add install counter
|
||||
echo "Install counter file." > WAU_InstallCounter
|
||||
|
||||
- name: Create release
|
||||
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0
|
||||
|
@ -107,7 +109,7 @@ jobs:
|
|||
prerelease: true
|
||||
generateReleaseNotes: true
|
||||
name: "v${{ steps.versioning.outputs.version }} [Nightly Build]"
|
||||
artifacts: "WAU.zip,WAU_ADMX.zip"
|
||||
artifacts: "WAU.zip,WAU_ADMX.zip,WAU_InstallCounter"
|
||||
|
||||
- name: URL to release
|
||||
run: echo "Release -> ${{ steps.release.outputs.html_url }}"
|
||||
|
|
|
@ -71,6 +71,8 @@ jobs:
|
|||
cd Policies
|
||||
zip -r ../WAU_ADMX.zip *
|
||||
cd ..
|
||||
# Add install counter
|
||||
echo "Install counter file." > WAU_InstallCounter
|
||||
|
||||
- name: Create release
|
||||
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0
|
||||
|
@ -79,4 +81,4 @@ jobs:
|
|||
prerelease: ${{ github.event.inputs.pre-release }}
|
||||
generateReleaseNotes: true
|
||||
name: "v${{ steps.versioning.outputs.version }}"
|
||||
artifacts: "WAU.zip,WAU_ADMX.zip"
|
||||
artifacts: "WAU.zip,WAU_ADMX.zip,WAU_InstallCounter"
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
# Winget-AutoUpdate (WAU)
|
||||
|
||||
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Romanitho/Winget-AutoUpdate?label=Latest%20Stable%20Release&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest)
|
||||
[![GitHub release (by tag)](https://img.shields.io/github/downloads/Romanitho/Winget-AutoUpdate/latest/total?label=Downloads&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest)
|
||||
[![GitHub release (by tag)](https://img.shields.io/github/downloads/Romanitho/Winget-AutoUpdate/latest/WAU.zip?label=Downloads&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest)
|
||||
<!-- [![GitHub release (by tag)](https://img.shields.io/github/downloads/Romanitho/Winget-AutoUpdate/latest/WAU_InstallCounter?label=Installations&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest) -->
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -229,7 +230,8 @@ Feel free to give us any suggestions or optimizations in code and support us by
|
|||
#### WAU - GitHub
|
||||
|
||||
[![GitHub release (release name instead of tag name)](https://img.shields.io/github/v/release/Romanitho/Winget-AutoUpdate?display_name=release&include_prereleases&label=Latest%20Release&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/)
|
||||
[![GitHub release (latest by SemVer including pre-releases)](https://img.shields.io/github/downloads-pre/Romanitho/Winget-AutoUpdate/latest/total?label=Downloads&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/)<br>
|
||||
[![GitHub release (latest by SemVer including pre-releases)](https://img.shields.io/github/downloads-pre/Romanitho/Winget-AutoUpdate/latest/WAU.zip?label=Downloads&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/)
|
||||
[![GitHub release (latest by SemVer including pre-releases)](https://img.shields.io/github/downloads-pre/Romanitho/Winget-AutoUpdate/latest/WAU_InstallCounter?label=Installations&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/)<br>
|
||||
[![GitHub all releases](https://img.shields.io/github/downloads/Romanitho/Winget-AutoUpdate/total?label=Total%20downloads&style=flat-square)](https://somsubhra.github.io/github-release-stats/?username=Romanitho&repository=Winget-AutoUpdate&page=1&per_page=1000)
|
||||
|
||||
</div>
|
||||
|
|
|
@ -338,6 +338,9 @@ function Install-WingetAutoUpdate {
|
|||
Add-Shortcut "wscript.exe" "${env:Public}\Desktop\WAU - Check for updated Apps.lnk" "`"$($WAUinstallPath)\Invisible.vbs`" `"powershell.exe -NoProfile -ExecutionPolicy Bypass -File `"`"`"$($WAUinstallPath)\user-run.ps1`"`"" "${env:SystemRoot}\System32\shell32.dll,-16739" "Manual start of Winget-AutoUpdate (WAU)..."
|
||||
}
|
||||
|
||||
#Add 1 to counter file
|
||||
Invoke-RestMethod -Uri "https://github.com/Romanitho/Winget-AutoUpdate/releases/download/$($WAUVersion)/WAU_InstallCounter" | Out-Null
|
||||
|
||||
Write-ToLog "-> WAU Installation succeeded!`n" "Green"
|
||||
Start-sleep 1
|
||||
|
||||
|
|
|
@ -182,6 +182,9 @@ function Invoke-PostUpdateActions {
|
|||
#Get updated WAU Config
|
||||
$Script:WAUConfig = Get-WAUConfig
|
||||
|
||||
#Add 1 to counter file
|
||||
Invoke-RestMethod -Uri "https://github.com/Romanitho/Winget-AutoUpdate/releases/download/$($WAUVersion)/WAU_InstallCounter" | Out-Null
|
||||
|
||||
#log
|
||||
Write-ToLog "Post Update actions finished" "green"
|
||||
|
||||
|
|
Loading…
Reference in New Issue