Cache restored files are not found

I’ve got a restored cache like this:

      - name: Get Linux Artifact
        uses: actions/cache@v2
        env:
          cache-name: cache-linux
        with:
          path: |
            ${{ github.workspace }}/installer/build/install-dragengine-nightly-linux64.sh
            ${{ github.workspace }}/installer/build/install-dragengine-dev-nightly-linux64.sh
            ${{ github.workspace }}/installer/build/install-deigde-nightly-linux64.sh
            ${{ github.workspace }}/installer/build/install-deigde-dev-nightly-linux64.sh
          key: ${{ runner.os }}-cache-linux
          restore-keys: ${{ runner.os }}-cache-linux

And this works:

Received 26896510 of 26896510 (100.0%), 34.0 MBs/sec
Cache Size: ~26 MB (26896510 B)
/usr/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/042cc90b-f4ea-4d13-949b-6043c17abf4e/cache.tzst -P -C /home/runner/work/dragengine/dragengine
Cache restored successfully
Cache restored from key: Linux-cache-linux

The following release artifact upload can though not find the files:

Upload Assets
  tar: /home/runner/work/dragengine/dragengine/installer/build/install-dragengine-dev-nightly-linux64.sh: No such file or directory
  tar: error exit delayed from previous errors

What do I have to do to get the restored cache files to be visible and usable?

Hi,

For artifacts, I believe you will need to use the actions/upload-artifact and download-artifact actions rather than actions/cache.

Looks like upload/download-artifact works better. What I’ve noticed now is that uploading to a github release is not working correctly. I’m using “github-release” since I did not find something better but maybe I’m barking up the wrong tree here. What I want is having a single pre-release release on github which is updated each time the workflow runs. Typical nightly-build type release. But this action creates new same named releases all the time. If I have that one solved I think I’m pretty close to get it working (except cmake randomly hanging causing workflow timeout).

nightly_build.yml

Hrm. This issue meeDamian/github-release#2 seems related to what you are attempting. It appears you have to delete the existing release and recreate it. The author of the issue created their own action (majkrzak/create-release) that does that.

The official but deprecated actions/create-release proposes some alternatives that could be worth exploring:

ncipollo/release-action had been the only one doing the job. Using comma delimited artifacts string to upload is a bit stupid but I got it working like this.

Now I need to figure out how I can properly run innosetup. On my jenkins I use a docker image but I’m not sure if github actions can do this too.

EDIT: Also. If you do released manually the source code is attached as zip file too. Using the above mentioned action this is not the case. Is there a way to attach the zipped code without zipping it up manually? Would be more consistent with manual releases.