Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
MattEdwardsWaggleBee committed Apr 30, 2024
2 parents a16823e + 78bb2e5 commit 7ee5899
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/create-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Create Prerelease
on:
workflow_dispatch:
inputs:
update_version:
description: 'Update version number:'
type: boolean
required: true
default: true
version_type:
description: 'Update branch version by:'
type: choice
Expand Down Expand Up @@ -43,11 +48,17 @@ jobs:
shell: pwsh
run: |
Import-Module ./solution-helper.psm1 -Force
$previousVersion, $newVersion = Update-Version -type ${{ github.event.inputs.version_type }}
if (${{ github.event.inputs.update_version }}) {
$previousVersion, $newVersion = Update-Version -type ${{ github.event.inputs.version_type }}
} else {
$newVersion = Get-Version
$previousVersion = $newVersion
}
echo "version_tag=$newVersion" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "previous_version_tag=$previousVersion" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Check for Existing Release
if: github.event.inputs.update_version
run: |
# Fetch the list of releases
releases=$(gh release list --json createdAt,tagName --limit 100)
Expand All @@ -71,6 +82,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update Version Number
if: github.event.inputs.update_version
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
Expand Down

0 comments on commit 7ee5899

Please sign in to comment.