create v1 hotfixes
parent
8e7004b30b
commit
33c315af0f
|
@ -1,125 +0,0 @@
|
||||||
---
|
|
||||||
name: WAU - Auto Create Pre-Release Version
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 * * *"
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check_merged:
|
|
||||||
name: Compare latest merge and tag
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
should_run: ${{ steps.should_run.outputs.SHOULD_RUN }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Check if latest merged is older than latest tag
|
|
||||||
id: should_run
|
|
||||||
run: |
|
|
||||||
echo "Latest tag:"
|
|
||||||
git log --tags --pretty="%ci - %h - %s %d" -n 1
|
|
||||||
LATEST_TAG_DATE=$(git log --tags -n 1 --pretty="%ct")
|
|
||||||
echo $LATEST_TAG_DATE
|
|
||||||
|
|
||||||
echo "Latest merge:"
|
|
||||||
git log --merges --pretty="%ci - %h - %s %d" -n 1
|
|
||||||
LATEST_MERGE_DATE=$(git log --merges -n 1 --pretty="%ct")
|
|
||||||
echo $LATEST_MERGE_DATE
|
|
||||||
|
|
||||||
if [[ $LATEST_MERGE_DATE -gt $LATEST_TAG_DATE ]]; then
|
|
||||||
echo "Latest tag is older than latest merge. Nightly will be created."
|
|
||||||
echo "SHOULD_RUN=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "Latest merge is not older than latest tag. No new release needed."
|
|
||||||
echo "SHOULD_RUN=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
build:
|
|
||||||
name: Create Release Asset
|
|
||||||
needs: [check_merged]
|
|
||||||
if: ${{ needs.check_merged.outputs.should_run == 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
lfs: "true"
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Auto Increment Semver Action
|
|
||||||
uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2
|
|
||||||
id: versioning
|
|
||||||
with:
|
|
||||||
releaseType: Patch
|
|
||||||
incrementPerCommit: false
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Next Release Number
|
|
||||||
id: WAU_version
|
|
||||||
run: |
|
|
||||||
echo "Next Release version: ${{ steps.versioning.outputs.version }}"
|
|
||||||
|
|
||||||
- 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
|
|
||||||
id: release
|
|
||||||
with:
|
|
||||||
tag: "v${{ steps.versioning.outputs.version }}"
|
|
||||||
prerelease: true
|
|
||||||
generateReleaseNotes: true
|
|
||||||
name: "v${{ steps.versioning.outputs.version }} [Nightly Build]"
|
|
||||||
artifacts: "WAU-Configurator.zip,WAU.zip,WAU_ADMX.zip,WAU_InstallCounter"
|
|
||||||
|
|
||||||
- name: URL to release
|
|
||||||
run: echo "Release -> ${{ steps.release.outputs.html_url }}"
|
|
|
@ -1,94 +1,81 @@
|
||||||
---
|
---
|
||||||
name: WAU - Create New Version
|
name: WAU - Create New v1 Version
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
type: choice
|
type: string
|
||||||
default: "Patch"
|
description: Specify a custom version (1.x.x)
|
||||||
description: Select next release type
|
required: true
|
||||||
options:
|
pre-release:
|
||||||
- Patch
|
type: boolean
|
||||||
- Minor
|
description: Set as Pre-release version
|
||||||
- Major
|
|
||||||
required: true
|
permissions:
|
||||||
pre-release:
|
contents: write
|
||||||
type: boolean
|
|
||||||
description: Set as Pre-release version
|
jobs:
|
||||||
|
build:
|
||||||
permissions:
|
name: Create Release Asset
|
||||||
contents: write
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
jobs:
|
- name: Checkout code
|
||||||
build:
|
uses: actions/checkout@v4
|
||||||
name: Create Release Asset
|
with:
|
||||||
runs-on: ubuntu-latest
|
lfs: "true"
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
- name: Overwrite Version.txt file
|
||||||
uses: actions/checkout@v4
|
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
|
||||||
with:
|
with:
|
||||||
lfs: "true"
|
path: Sources/Winget-AutoUpdate/Version.txt
|
||||||
|
write-mode: overwrite
|
||||||
- name: Auto Increment Semver Action
|
contents: "${{ github.event.inputs.version }}"
|
||||||
uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2
|
|
||||||
id: versioning
|
- name: Commit & Push
|
||||||
with:
|
uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # v1.5
|
||||||
releaseType: ${{ github.event.inputs.version }}
|
with:
|
||||||
incrementPerCommit: false
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
branch: v1
|
||||||
|
force: true
|
||||||
- name: Overwrite Version.txt file
|
message: "Changed version to ${{ github.event.inputs.version }}"
|
||||||
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
|
|
||||||
with:
|
- name: Build project
|
||||||
path: Sources/Winget-AutoUpdate/Version.txt
|
run: |
|
||||||
write-mode: overwrite
|
echo "### Get MDT from Microsoft ###"
|
||||||
contents: "${{ steps.versioning.outputs.version }}"
|
wget https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x64.msi
|
||||||
|
|
||||||
- name: Commit & Push
|
echo "### Extract MSI ###"
|
||||||
uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # v1.5
|
7z x MicrosoftDeploymentToolkit_x64.msi
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
echo "### Copy ServiceUI.exe to 'Sources/Winget-AutoUpdate' folder ###"
|
||||||
branch: main
|
mv Modena_File206 Sources/Winget-AutoUpdate/ServiceUI.exe -v
|
||||||
force: true
|
|
||||||
message: "Changed version to ${{ steps.versioning.outputs.version }}"
|
echo "### Go to Sources ###"
|
||||||
|
cd Sources
|
||||||
- name: Build project
|
|
||||||
run: |
|
echo "### Zip WAU ###"
|
||||||
echo "### Get MDT from Microsoft ###"
|
zip -r ../WAU.zip Winget-AutoUpdate
|
||||||
wget https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x64.msi
|
zip ../WAU.zip Winget-AutoUpdate-Install.ps1
|
||||||
|
|
||||||
echo "### Extract MSI ###"
|
echo "### Zip WAU-Configurator ###"
|
||||||
7z x MicrosoftDeploymentToolkit_x64.msi
|
zip -r ../WAU-Configurator.zip Winget-AutoUpdate
|
||||||
|
zip ../WAU-Configurator.zip "Winget-AutoUpdate-Install.ps1"
|
||||||
echo "### Copy ServiceUI.exe to 'Sources/Winget-AutoUpdate' folder ###"
|
zip ../WAU-Configurator.zip "WAU Configurator.bat"
|
||||||
mv Modena_File206 Sources/Winget-AutoUpdate/ServiceUI.exe -v
|
|
||||||
|
echo "### Zip ADMX ###"
|
||||||
echo "### Go to Sources ###"
|
cd Policies
|
||||||
cd Sources
|
zip -r ../../WAU_ADMX.zip *
|
||||||
|
cd ../..
|
||||||
echo "### Zip WAU ###"
|
|
||||||
zip -r ../WAU.zip Winget-AutoUpdate
|
echo "### Create install counter file ###"
|
||||||
zip ../WAU.zip Winget-AutoUpdate-Install.ps1
|
echo "Install counter file." > WAU_InstallCounter
|
||||||
|
|
||||||
echo "### Zip WAU-Configurator ###"
|
- name: Create release
|
||||||
zip -r ../WAU-Configurator.zip Winget-AutoUpdate
|
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
|
||||||
zip ../WAU-Configurator.zip "Winget-AutoUpdate-Install.ps1"
|
with:
|
||||||
zip ../WAU-Configurator.zip "WAU Configurator.bat"
|
tag: "v${{ github.event.inputs.version }}"
|
||||||
|
prerelease: ${{ github.event.inputs.pre-release }}
|
||||||
echo "### Zip ADMX ###"
|
generateReleaseNotes: true
|
||||||
cd Policies
|
name: "WAU ${{ github.event.inputs.version }}"
|
||||||
zip -r ../../WAU_ADMX.zip *
|
artifacts: "WAU-Configurator.zip,WAU.zip,WAU_ADMX.zip,WAU_InstallCounter"
|
||||||
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"
|
|
Loading…
Reference in New Issue