2023-04-12 12:11:31 +00:00
|
|
|
name: Auto Create Pre-Release Version
|
|
|
|
|
|
|
|
on:
|
2023-04-12 12:34:23 +00:00
|
|
|
workflow_dispatch:
|
2023-04-12 12:11:31 +00:00
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- closed
|
2023-04-12 14:25:56 +00:00
|
|
|
|
2023-04-12 12:30:51 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2023-04-12 12:11:31 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Create Release Asset
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
2023-04-12 14:25:56 +00:00
|
|
|
lfs: 'true'
|
|
|
|
|
|
|
|
- name: Auto Increment Semver Action
|
|
|
|
uses: MCKanpolat/auto-semver-action@v1
|
|
|
|
id: versioning
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Overwrite Version.txt file
|
|
|
|
uses: "DamianReeves/write-file-action@master"
|
|
|
|
with:
|
|
|
|
path: Winget-AutoUpdate/Winget-AutoUpdate/Version.txt
|
|
|
|
write-mode: overwrite
|
|
|
|
contents: ${{ steps.versioning.outputs.version }}
|
|
|
|
|
|
|
|
- name: Commit & Push
|
|
|
|
uses: Andro999b/push@v1.3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: main
|
|
|
|
force: true
|
|
|
|
message: 'Changed version to ${{ steps.versioning.outputs.version }}'
|
|
|
|
|
|
|
|
- name: Build project
|
2023-04-12 12:11:31 +00:00
|
|
|
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
|
2023-04-12 14:25:56 +00:00
|
|
|
|
2023-04-12 12:11:31 +00:00
|
|
|
- uses: "marvinpinto/action-automatic-releases@latest"
|
|
|
|
with:
|
|
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
automatic_release_tag: "v${{ steps.versioning.outputs.version }}"
|
|
|
|
prerelease: true
|
|
|
|
title: "v${{ steps.versioning.outputs.version }}"
|
|
|
|
files: |
|
2023-04-12 14:25:56 +00:00
|
|
|
WAU.zip
|