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@v3
|
|
|
|
with:
|
2023-04-22 11:06:20 +00:00
|
|
|
lfs: "true"
|
2023-04-17 23:00:26 +00:00
|
|
|
|
|
|
|
- name: Auto Increment Semver Action
|
|
|
|
uses: MCKanpolat/auto-semver-action@1.0.9
|
|
|
|
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: |
|
|
|
|
zip -r WAU Winget-AutoUpdate/*
|
|
|
|
zip -r WAU Winget-AutoUpdate-Install.ps1
|
|
|
|
zip -r WAU excluded_apps.txt
|
|
|
|
zip -r WAU install.bat
|
|
|
|
zip -r WAU uninstall.bat
|
|
|
|
|
|
|
|
- name: Create release
|
|
|
|
uses: "ncipollo/release-action@v1"
|
|
|
|
with:
|
|
|
|
tag: "v${{ steps.versioning.outputs.version }}"
|
|
|
|
prerelease: ${{ github.event.inputs.pre-release }}
|
|
|
|
generateReleaseNotes: true
|
|
|
|
name: "v${{ steps.versioning.outputs.version }}"
|
2023-04-22 03:43:31 +00:00
|
|
|
artifacts: "WAU.zip"
|