add CI build test branch to workflow

This just avoids needing to run build tests on the main `develop` branch.
This commit is contained in:
Jesse Plamondon-Willard
2026-01-14 01:10:36 -05:00
parent e76e995320
commit 8cdb0eae0f
+4 -25
View File
@@ -6,6 +6,7 @@ on:
- "[0-9]+.[0-9]+.[0-9]+" # stable version tag
branches:
- develop
- build-test
jobs:
build_and_release:
@@ -20,28 +21,6 @@ jobs:
with:
fetch-depth: 0
- name: Get trigger type # possible values: tag, dev-branch
id: trigger-type
shell: pwsh
run: |
# If we ever decide to add manual workflow runs, this will need to be reworked.
if ('${{github.ref_type}}' -eq 'tag') {
Write-Host 'Building regular release.'
'trigger_type=tag' | Out-File -FilePath $env:GITHUB_OUTPUT -Append
}
elseif ('${{github.ref_name}}' -eq 'develop') {
Write-Host 'Building in-development release.'
'trigger_type=dev-branch' | Out-File -FilePath $env:GITHUB_OUTPUT -Append
}
else {
Write-Error 'Ran into an unexpected trigger type. Aborting.'
Write-Host 'Debug info:'
Write-Host 'ref_type: ${{github.ref_type}}'
Write-Host 'ref_name: ${{github.ref_name}}'
exit 1
}
- name: Get SMAPI assembly version
id: smapi-version
shell: pwsh
@@ -72,7 +51,7 @@ jobs:
Write-Host "Version: $major.$minor.$patch"
- name: Verify SMAPI assembly version matches tag
if: steps.trigger-type.outputs.trigger_type == 'tag'
if: github.ref_type == 'tag'
shell: pwsh
run: |
if ($env:VERSION -ne '${{github.ref_name}}') {
@@ -84,7 +63,7 @@ jobs:
}
- name: Update SMAPI assembly version
if: steps.trigger-type.outputs.trigger_type == 'dev-branch'
if: github.ref_type != 'tag'
shell: pwsh
run: |
$updatedPatch = [int]${{steps.smapi-version.outputs.smapi_patch}} + 1
@@ -129,7 +108,7 @@ jobs:
- name: Create GitHub release
uses: ncipollo/release-action@v1
if: steps.trigger-type.outputs.trigger_type == 'tag'
if: github.ref_type == 'tag'
with:
artifacts: 'bin/SMAPI-${{env.VERSION}}*.zip'
token: '${{secrets.GITHUB_TOKEN}}'