1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2025-12-19 18:08:29 +00:00

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.
This commit is contained in:
Jan Čermák
2025-08-15 10:43:35 +02:00
committed by GitHub
parent 17d811a78f
commit 4e000b8a7e

View File

@@ -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