From 4e000b8a7e4e022179e730bf776b2648fd197901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Fri, 15 Aug 2025 10:43:35 +0200 Subject: [PATCH] Enable publishing of dev builds to R2 without bumping version (#4232) * Enable publishing of dev builds to R2 without bumping version We currently can only use Github artifacts for on-demand builds from feature branches. However, downloading of these requires authentication and it's tricky to update a device if we need feedback from user testing. On the other hand, we never want to publish to the dev channel from anything else than from the dev branch. Restrict version bump to builds from release channels or from the dev branch only. * Use YYYYMMDD dev suffix only for published dev branch For feature builds, or for builds that should not be published, use timestamp suffix instead of YYYYMMDD. That way feature builds won't collide with dev releases. --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2f6921444..a45439fc7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -77,7 +77,7 @@ jobs: PUBLISH_BUILD: ${{ steps.check_publish.outputs.publish_build }} run: | version_dev="dev$(date --utc +'%Y%m%d')" - if [ "${{ env.PUBLISH_BUILD }}" != "true" ]; then + if [ "${{ env.PUBLISH_BUILD }}" != "true" ] || [ "${{ github.ref }}" != "refs/heads/dev" ]; then version_dev="dev$(date +%s)" fi echo "Development version \"${version_dev}\"" @@ -432,7 +432,7 @@ jobs: bump_version: name: Bump ${{ needs.prepare.outputs.channel }} channel version - if: ${{ github.repository == 'home-assistant/operating-system' && needs.prepare.outputs.publish_build == 'true' }} + if: ${{ github.repository == 'home-assistant/operating-system' && needs.prepare.outputs.publish_build == 'true' && (needs.prepare.outputs.channel != 'dev' || github.ref == 'refs/heads/dev') }} environment: ${{ needs.prepare.outputs.channel }} needs: [ build, prepare ] runs-on: ubuntu-22.04