Skip to content

app-8038222608

app-8038222608 #10

Workflow file for this run

name: 'openHAB Build and Release app'
run-name: app-${{github.run_id }}
env:
BUILD_NUMBER: '1970.1.1'
BuildDirectory: '${{github.workspace}}\build'
ACTIONS_RUNNER_DEBUG: true
on:
workflow_dispatch:
inputs:
BuildConfiguration:
description: 'Specifices if a release or debug package should be created.'
default: 'release'
required: false
IsBetaRelease:
description: 'Specifices if a beta release should be created.'
default: 'false'
required: false
jobs:
configure:
name: Configure Build
runs-on: ubuntu-latest
outputs:
build_configuration: ${{ steps.detect-build-configuration.outputs.BuildConfiguration }}
bundle_Platforms: ${{ steps.detect-build-configuration.outputs.BundlePlatforms }}
build_number: ${{ steps.set-buildnumber.outputs.BUILD_NUMBER }}
release_name: ${{ steps.set-buildnumber.outputs.Release_Name }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Detect Build Configuration
id: detect-build-configuration
shell: pwsh
run: |
if ($env:github.ref -eq 'refs/heads/main') {
Write-Host "BuildConfiguration=release" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
Write-Host "BundlePlatforms=x86|x64|ARM" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
} else {
Write-Host "BuildConfiguration=debug" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
Write-Host "BundlePlatforms=x86" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
}
- name: Set build number and release name
id: set-buildnumber
shell: pwsh
run: |
$CURRENTDATE = Get-Date -Format "yyyy.MM.dd"
Write-Host "BUILD_NUMBER=$CURRENTDATE" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
$IS_BETA_RELEASE = '${{ inputs.IsBetaRelease }}''
if ($IS_BETA_RELEASE -eq 'true') {
Write-Host "RELEASE_NAME=Beta:$CURRENTDATE.${{github.run_number}}" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
} else {
Write-Host "RELEASE_NAME=$CURRENTDATE" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
}
build:
uses: ./.github/workflows/build.yml
needs: configure
with:
build_configuration: ${{needs.configure.outputs.build_configuration}}
bundle_Platforms: ${{ needs.configure.outputs.bundle_Platforms}}
build_number: ${{ needs.configure.outputs.build_number}}
secrets: inherit
create_release:
needs: build
uses: ./.github/workflows/release.yml
with:
beta_release: ${{ inputs.IsBetaRelease }}
build_number: ${{needs.configure.outputs.build_number}}