env variables in file pattern not processed
Closed this issue · 2 comments
liudonghua123 commented
I have a step like the following.
- uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: ${APP_NAME}-linux-${{ steps.branch_name.outputs.SOURCE_NAME }}.zip
tags: true
draft: false
However the env variables in the file is not replaced.
The full build logs is
Run xresloader/upload-to-github-release@v1
with:
file: ${APP_NAME}-linux-1.0.0+1.zip
tags: true
draft: false
overwrite: false
prerelease: false
verbose: false
update_latest_release: false
env:
APP_NAME: ynu_network_reset
JAVA_HOME_8.0.272_x64: /opt/hostedtoolcache/jdk/8.0.272/x64
JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.272/x64
JAVA_HOME_8_0_272_X64: /opt/hostedtoolcache/jdk/8.0.272/x64
FLUTTER_HOME: /opt/hostedtoolcache/flutter/1.24.0-6.0.pre-dev/x64
GITHUB_TOKEN: ***
Found tag to push: 1.0.0+1.
Error: Can not find any file by ${APP_NAME}-linux-1.0.0+1.zip
I checked the code, maybe it is a bug/feature of @actions/core
or globby
.
upload-to-github-release/src/index.ts
Line 15 in fdd72e0
upload-to-github-release/src/index.ts
Line 129 in fdd72e0
I also filed an issue on actions/toolkit#623.
liudonghua123 commented
I searched npm packages. Maybe we can use string-env-interpolation
or env-string
to do this simple env interpolation job.
owent commented
Thanks. And I also add codes to provide env-interpolation for string parameters.