--- name: WAU - Create New Version on: workflow_dispatch: inputs: version: type: choice default: "Patch" description: Select next release type options: - Patch - Minor - Major required: true 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 uses: actions/checkout@v4 with: lfs: "true" - name: Auto Increment Semver Action uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2 id: versioning with: releaseType: ${{ github.event.inputs.version }} incrementPerCommit: false github_token: ${{ secrets.GITHUB_TOKEN }} - name: Overwrite Version.txt file uses: DamianReeves/write-file-action@0a7fcbe1960c53fc08fe789fa4850d24885f4d84 # v1.2 with: path: Sources/WAU/Winget-AutoUpdate/Version.txt write-mode: overwrite contents: "${{ steps.versioning.outputs.version }}" - name: Commit & Push uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 # v1.4 with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: main force: true message: "Changed version to ${{ steps.versioning.outputs.version }}" - name: Build project run: | echo "### Get MDT from Microsoft ###" wget https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x64.msi echo "### Extract MSI ###" 7z x MicrosoftDeploymentToolkit_x64.msi echo "### Copy ServiceUI.exe to 'Sources/WAU/Winget-AutoUpdate' folder ###" mv Modena_File206 Sources/WAU/Winget-AutoUpdate/ServiceUI.exe -v echo "### Go to Sources ###" cd Sources echo "### Zip WAU ###" cd WAU zip -r ../../WAU.zip Winget-AutoUpdate zip ../../WAU.zip Winget-AutoUpdate-Install.ps1 zip ../../WAU.zip excluded_apps.txt cd .. echo "### Zip WAU-Configurator ###" zip -r ../WAU-Configurator.zip WAU zip ../WAU-Configurator.zip "WAU Configurator.lnk" echo "### Zip ADMX ###" cd Policies zip -r ../../WAU_ADMX.zip * cd ../.. echo "### Create install counter file ###" echo "Install counter file." > WAU_InstallCounter - name: Create release uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0 with: tag: "v${{ steps.versioning.outputs.version }}" prerelease: ${{ github.event.inputs.pre-release }} generateReleaseNotes: true name: "v${{ steps.versioning.outputs.version }}" artifacts: "WAU-Configurator.zip,WAU.zip,WAU_ADMX.zip,WAU_InstallCounter"