Skip to content

Commit

Permalink
create v1 hotfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Romanitho committed Sep 30, 2024
1 parent 8e7004b commit 33c315a
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 219 deletions.
125 changes: 0 additions & 125 deletions .github/workflows/WAU-AutoCreatePreVersion.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,94 +1,81 @@
---
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@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
with:
path: Sources/Winget-AutoUpdate/Version.txt
write-mode: overwrite
contents: "${{ steps.versioning.outputs.version }}"

- name: Commit & Push
uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # v1.5
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/Winget-AutoUpdate' folder ###"
mv Modena_File206 Sources/Winget-AutoUpdate/ServiceUI.exe -v
echo "### Go to Sources ###"
cd Sources
echo "### Zip WAU ###"
zip -r ../WAU.zip Winget-AutoUpdate
zip ../WAU.zip Winget-AutoUpdate-Install.ps1
echo "### Zip WAU-Configurator ###"
zip -r ../WAU-Configurator.zip Winget-AutoUpdate
zip ../WAU-Configurator.zip "Winget-AutoUpdate-Install.ps1"
zip ../WAU-Configurator.zip "WAU Configurator.bat"
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@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.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"
---
name: WAU - Create New v1 Version

on:
workflow_dispatch:
inputs:
version:
type: string
description: Specify a custom version (1.x.x)
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: Overwrite Version.txt file
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
with:
path: Sources/Winget-AutoUpdate/Version.txt
write-mode: overwrite
contents: "${{ github.event.inputs.version }}"

- name: Commit & Push
uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # v1.5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: v1
force: true
message: "Changed version to ${{ github.event.inputs.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/Winget-AutoUpdate' folder ###"
mv Modena_File206 Sources/Winget-AutoUpdate/ServiceUI.exe -v
echo "### Go to Sources ###"
cd Sources
echo "### Zip WAU ###"
zip -r ../WAU.zip Winget-AutoUpdate
zip ../WAU.zip Winget-AutoUpdate-Install.ps1
echo "### Zip WAU-Configurator ###"
zip -r ../WAU-Configurator.zip Winget-AutoUpdate
zip ../WAU-Configurator.zip "Winget-AutoUpdate-Install.ps1"
zip ../WAU-Configurator.zip "WAU Configurator.bat"
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@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
with:
tag: "v${{ github.event.inputs.version }}"
prerelease: ${{ github.event.inputs.pre-release }}
generateReleaseNotes: true
name: "WAU ${{ github.event.inputs.version }}"
artifacts: "WAU-Configurator.zip,WAU.zip,WAU_ADMX.zip,WAU_InstallCounter"

0 comments on commit 33c315a

Please sign in to comment.