- name: Archive Windows Build
uses: actions/upload-artifact@v1
with:
name: "CISampleWin64Binary$(sh ./get-version.sh)" # How to insert var here?
path: ./bin-win64
Trying to procedurally name my artifacts with the current version of the project. I'm don't know a whole lot about bash, sh, or unixy stuff. However, I'm guessing this name field just takes a string and does not parse like a bash string would. Is there anyway to achieve what I am looking to do?
In order to use the the version within the with expression, it has to be a string as shown here.
Create an initial step that exports the variable to the environment:
- name: Export Archive Version
run: echo "::set-env name=ARCHIVE_VERSION::$(./get-version.sh)"
shell: sh
Now in your new step you use this variable from env:
- name: Archive Windows Build
uses: actions/upload-artifact@v1
with:
name: "${{format('CISampleWin64Binary{0}', env.ARCHIVE_VERSION)}}"
path: ./bin-win64
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With