2023-04-18 12:41:35 +00:00
|
|
|
---
|
2023-04-22 03:43:31 +00:00
|
|
|
name: WAU - Create New Version
|
2023-04-17 23:00:26 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
type: choice
|
2023-04-22 11:06:20 +00:00
|
|
|
default: "Patch"
|
2023-04-17 23:00:26 +00:00
|
|
|
description: Select next release type
|
|
|
|
options:
|
2023-04-18 12:41:35 +00:00
|
|
|
- Patch
|
|
|
|
- Minor
|
|
|
|
- Major
|
2023-04-18 12:49:26 +00:00
|
|
|
required: true
|
2023-04-17 23:00:26 +00:00
|
|
|
pre-release:
|
|
|
|
type: boolean
|
|
|
|
description: Set as Pre-release version
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Create Release Asset
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2023-09-11 06:54:10 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-04-17 23:00:26 +00:00
|
|
|
with:
|
2023-04-22 11:06:20 +00:00
|
|
|
lfs: "true"
|
2023-04-17 23:00:26 +00:00
|
|
|
|
|
|
|
- name: Auto Increment Semver Action
|
2024-09-01 13:40:49 +00:00
|
|
|
uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2
|
2023-04-17 23:00:26 +00:00
|
|
|
id: versioning
|
|
|
|
with:
|
|
|
|
releaseType: ${{ github.event.inputs.version }}
|
|
|
|
incrementPerCommit: false
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Overwrite Version.txt file
|
2024-09-01 13:40:49 +00:00
|
|
|
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
|
2023-04-17 23:00:26 +00:00
|
|
|
with:
|
2024-09-01 13:40:49 +00:00
|
|
|
path: Sources/Winget-AutoUpdate/Version.txt
|
2023-04-17 23:00:26 +00:00
|
|
|
write-mode: overwrite
|
|
|
|
contents: "${{ steps.versioning.outputs.version }}"
|
|
|
|
|
|
|
|
- name: Commit & Push
|
2024-09-01 13:40:49 +00:00
|
|
|
uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # v1.5
|
2023-04-17 23:00:26 +00:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: main
|
|
|
|
force: true
|
2023-04-22 11:06:20 +00:00
|
|
|
message: "Changed version to ${{ steps.versioning.outputs.version }}"
|
2023-04-17 23:00:26 +00:00
|
|
|
|
|
|
|
- name: Build project
|
|
|
|
run: |
|
2024-09-02 06:30:10 +00:00
|
|
|
echo "### Get MDT from Microsoft ###"
|
2023-10-19 14:48:04 +00:00
|
|
|
wget https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x64.msi
|
2023-12-12 20:31:40 +00:00
|
|
|
|
|
|
|
echo "### Extract MSI ###"
|
2023-10-19 14:48:04 +00:00
|
|
|
7z x MicrosoftDeploymentToolkit_x64.msi
|
2023-12-12 20:31:40 +00:00
|
|
|
|
2024-09-01 13:40:49 +00:00
|
|
|
echo "### Copy ServiceUI.exe to 'Sources/Winget-AutoUpdate' folder ###"
|
|
|
|
mv Modena_File206 Sources/Winget-AutoUpdate/ServiceUI.exe -v
|
2023-12-12 20:31:40 +00:00
|
|
|
|
|
|
|
echo "### Go to Sources ###"
|
|
|
|
cd Sources
|
|
|
|
|
|
|
|
echo "### Zip WAU ###"
|
2024-09-02 05:37:33 +00:00
|
|
|
zip -r ../WAU.zip Winget-AutoUpdate
|
|
|
|
zip ../WAU.zip Winget-AutoUpdate-Install.ps1
|
2023-12-12 20:31:40 +00:00
|
|
|
|
|
|
|
echo "### Zip WAU-Configurator ###"
|
2024-09-02 05:37:33 +00:00
|
|
|
zip -r ../WAU-Configurator.zip Winget-AutoUpdate
|
|
|
|
zip ../WAU-Configurator.zip "Winget-AutoUpdate-Install.ps1"
|
|
|
|
zip ../WAU-Configurator.zip "WAU Configurator.bat"
|
2023-12-12 20:31:40 +00:00
|
|
|
|
|
|
|
echo "### Zip ADMX ###"
|
|
|
|
cd Policies
|
|
|
|
zip -r ../../WAU_ADMX.zip *
|
|
|
|
cd ../..
|
|
|
|
|
2023-04-17 23:00:26 +00:00
|
|
|
- name: Create release
|
2024-09-01 13:40:49 +00:00
|
|
|
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
|
2023-04-17 23:00:26 +00:00
|
|
|
with:
|
2023-10-30 10:24:19 +00:00
|
|
|
tag: "v${{ steps.versioning.outputs.version }}"
|
2023-04-17 23:00:26 +00:00
|
|
|
prerelease: ${{ github.event.inputs.pre-release }}
|
|
|
|
generateReleaseNotes: true
|
|
|
|
name: "v${{ steps.versioning.outputs.version }}"
|
2023-12-12 23:11:31 +00:00
|
|
|
artifacts: "WAU-Configurator.zip,WAU.zip,WAU_ADMX.zip,WAU_InstallCounter"
|