wingetautoupdate/.github/workflows/WAU-CreateNewVersion.yml

75 lines
2.0 KiB
YAML
Raw Normal View History

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
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
2023-05-03 09:14:21 +00:00
uses: MCKanpolat/auto-semver-action@1.0.10
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
uses: DamianReeves/write-file-action@v1.2
with:
path: Winget-AutoUpdate/Version.txt
write-mode: overwrite
contents: "${{ steps.versioning.outputs.version }}"
- name: Commit & Push
uses: actions-js/push@v1.4
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: |
2023-10-10 16:10:45 +00:00
zip -r WAU.zip Winget-AutoUpdate
zip WAU.zip Winget-AutoUpdate-Install.ps1
zip WAU.zip excluded_apps.txt
zip WAU.zip install.bat
zip WAU.zip uninstall.bat
cd Policies
zip -r ../WAU_ADMX.zip *
cd ..
2023-04-17 23:00:26 +00:00
- name: Create release
2023-10-04 08:03:26 +00:00
uses: "ncipollo/release-action@v1"
2023-04-17 23:00:26 +00:00
with:
tag: "v${{ steps.versioning.outputs.version }}"
prerelease: ${{ github.event.inputs.pre-release }}
generateReleaseNotes: true
name: "v${{ steps.versioning.outputs.version }}"
2023-10-10 16:10:45 +00:00
artifacts: "WAU.zip,WAU_ADMX.zip"