`export`を使うのがよさそう。
```yaml
script:
- export TARGET="Windows"
- echo ${TARGET}
- echo ${TARGET}
```
## 参考
- [\[Solved\] Make variable visible across steps in Bitbucket pipelines? \- Local Coder](https://localcoder.org/make-variable-visible-across-steps-in-bitbucket-pipelines)