when doesn't currently support environment variables. The current workaround is to add env var checks inside our own scripts.
if [ SOME_ENV_VAR = true ]; then run commands; else echo "skip commands"; fi
It would be very useful to have access to env variables in the when condition so that these scripts do not have to be more complicated.
...
blocks:
- name: 'Distribute iOS build'
skip:
when: $PLATFORM == 'android'
...
If other env notation is not usable, it could be at the same level as the change_in function:
...
blocks:
- name: 'Distribute Android build'
skip:
when: "env(PLATFORM) == 'ios'"
...