wingetautoupdate/.github/workflows/AutoCreatePreVersion.yml

59 lines
1.5 KiB
YAML

name: Auto Create Pre-Release Version
on:
workflow_dispatch:
pull_request:
types:
- closed
permissions:
contents: write
jobs:
build:
name: Create Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
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/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
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
- 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: |
WAU.zip