Upload-artifact : Variable name #26012
-
Hi All, I’ve been looking for ways to have a varying name for the artifact that I upload, but I haven’t found solutions on here that allow what I’m looking for. For reference, I’ve looked at both of these solutions:
What I’m looking for is a way to set the name based on items that are set in a file that is also in the repository. Specifically, I’m using the Gradle for Java Action, with some minor tweaks. I am specifically looking for my artifact to be named
Thus the output would be If this is possible, please let me know how to specify that in my .yml file. If it can’t happen, then I’ll have to figure something else out. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You’ll have to do this in two steps: Assemble the artifact name (or components) from the file and store it in a variable, and then use that in the
|
Beta Was this translation helpful? Give feedback.
You’ll have to do this in two steps: Assemble the artifact name (or components) from the file and store it in a variable, and then use that in the
upload-artifact
step. I’d do the first part with a few lines of Python:uses: actions/upload-artifact@v2
with:
name: ${{ env.artifact_name }}
path: # your file goes here