balena.yml version is not working at all

I am trying to set the release version via the balena.yml version property.
this did work once or twice but since then it never did again.
even simple, definitely semver compliant versions like 2.2.2 are shown as 0.0.0-1759527711929 in the dashboard. im pulling my hair on this one.

this is my balena.yml currently:

name: Attraccess
type: sw.application
version: 2.2.2
1 Like

@Attraccess did you follow the instructions as described here :Deploy with balena button | balena ?

Which ones are you referring to exactly? As described in my issue: I did create a balena.yml file with a version property which follows semver versioning.
So to my understanding: yes I did follow the instructions

I just tested a balena.yml and it worked as intended for me, but I had a little more in my file:

name: myBrowser
type: sw.application
version: 2.2.2
description: >-
  My test for versioning
data:
  defaultDeviceType: raspberrypi4-64
  supportedDeviceTypes:
    - raspberrypi3
    - raspberrypi4-64

This is how it looks in my releases page: (with changing the version and also leaving it the same)

On which dashboard page(s) are you seeing the versions shown as 0.0.0-1759527711929 ?

1 Like

I have a balena.yml with version, build-secrets and build-variables and could never get the version to work.

1 Like

all pages that show a version.

feel free to check out my ci/cd pipelines to understand how my deployments work… maybe i have a stupid mistake…

this ones for PR’s: (i would understand if they dont work since i not only set a version but also a prerelease name, maybe thats interfering with the internal incremental preversion number of balena)

this one for nightly releases (essentially the same but a static prerelease name)

and this one for actual releases (no prerelease name, only version number, but still not working)

Can you post a balena.yml file that those workflows modify/output?

Simply visit the root of that repository, the file is right there.

version: 0.0.1
build-secrets:
  global:
    - source: foo.txt
      dest: bar.txt
build-variables:
  global:
    - ENV=canary
  baz:
    - ASDF=2e5a7362-7a42-4ac4-924c-86a05f81566a

@Attraccess what I mean is I’d like to see the balena.yml file you’re actually pushing, like the output of this line: Attraccess/.github/workflows/release.yml at 4802f55b1563e4aa85ee0e2bbc8b6121908e4e7d · Attraccess/Attraccess · GitHub

If you manually push a release does the versioning work?

1 Like

@yuriploc you can see the file format for balena.yml here: Deploy with balena button | balena

Your example seems to be missing the required field type as in type: sw.application

Do the build-secrets and build-variables work for you?

1 Like

Missed that one, thank you. Yes, the `build-*` fields work.

I see.

Here is the output of the set version step which also logs (cat balena.yml) the full content of the updated file:

2025-10-06T20:38:51.4203247Z ##[group]Run sed -i “s/{{VERSION_TO_BE_REPLACED}}/0.0.0-pr-217-7b3f8c8/” balena.yml
2025-10-06T20:38:51.4205806Z e[36;1msed -i “s/{{VERSION_TO_BE_REPLACED}}/0.0.0-pr-217-7b3f8c8/” balena.ymle[0m
2025-10-06T20:38:51.4207508Z e[36;1mcat balena.ymle[0m
2025-10-06T20:38:51.4243950Z shell: /usr/bin/bash -e {0}
2025-10-06T20:38:51.4245019Z env:
2025-10-06T20:38:51.4245890Z GHCR_IMAGE_NAME: attraccess/attraccess
2025-10-06T20:38:51.4247229Z DOCKERHUB_IMAGE_NAME: attraccess/attraccess
2025-10-06T20:38:51.4248511Z NX_CLOUD_ACCESS_TOKEN:
2025-10-06T20:38:51.4249507Z DOCKER_BUILDKIT: 1
2025-10-06T20:38:51.4250411Z ##[endgroup]
2025-10-06T20:38:51.4345377Z name: Attraccess
2025-10-06T20:38:51.4346646Z type: sw.application
2025-10-06T20:38:51.4347790Z version: ‘0.0.0-pr-217-7b3f8c8’

So the full content would be:

name: Attraccess
type: sw.application
version: ‘0.0.0-pr-217-7b3f8c8’

Manually pushing yields the same result

Pushing the exact same content of your balena.yml yielded the message “The balena.yml version field must be a valid semver (eg: 1.0.0). Please update your balena.yml or use the Dashboard to update the release version.”

However, removing the single quotes seemed to work.

used a balena.yml like the following:

name: my-app
type: sw.application
version: 0.0.1
build-secrets:
  global:
    - source: foo.txt
      dest: bar.txt
build-variables:
  global:
    - ENV=canary
  baz:
    - ASDF=2e5a7362-7a42-4ac4-924c-86a05f81566a

It’s a multicontainer build, not sure if that makes any difference. I still get 0.0.0+rev9 instead of 0.0.1

@yuriploc just wondering if you can try with only the minimal fields, such as:

name: my-app
type: sw.application
version: 0.0.1

same

@yuriploc can you provide the exact command that you are using during your push and if you are using the balena-cli for that also clarify the version that you are on so that we can try to reproduce more accurately?

Silly question, but I wanted to double check with you whether the balena.yml with the version is at the same folder from which you are initiating the push or not.

Another thing that could give us more clues would be if your run the following command in your browser console while viewing our dashboard and share the results:

await sdk.models.release.get(<the id of the created release here>, {
    $select: ['id', 'raw_version', 'release_version']
})