Is there any way to use output file using bash to be available as input to build.xml?

I am running the below command; 

steps:
    - uses: actions/checkout@v1
    - name: Get Git Id and diff files
      run: |
        echo “This is the current commit” $GITHUB_SHA
        sha_pre=$(git log --pretty=format:"%H" --merges -n 1)
        echo “This is the previous commit” $sha_pre
        sha_diff=$(git diff --pretty=format: --name-only $GITHUB_SHA $sha_pre)
        echo “$sha_diff” > DownloadDiff.txt
        cat -n DownloadDiff.txt

I want this Diff.txt file as an input for Build.xml in the same project. I have a command "

<loadfile property=“textFile” srcfile="./DownloadDiff.txt" /> in build.xml to fetch the file. But unfortunately its not working.
Below is the output 
“/home/runner/work/SalesforceDXCICD/SalesforceDXCICD/build.xml:10: /home/runner/work/SalesforceDXCICD/SalesforceDXCICD/DownloadDiff.txt doesn’t exist”

Please Help"

@nitssnatha ,

Whether the build step is in the same job with “checkout” and “Get Git Id and diff files”?

If not in the same job, you need to use artifacts or cache to share the files between jobs or workflow runs.

If the problem still exists, please share your repository with us, so that we can check more detailed configurations of the workflow and the build settings in your repository to analyze the root cause.

I have used the upload and download artifact approach. But it seems like taking much space.