2

I Would like to know if its possible to download the archived GitHub released source code file which is usually seen as( Source code(zip) & Source code(tar.gz) in the release pages using GitHub actions. I see lot of actions in the marketplace to download the release assets and I tried few of them, but mostly they download only the assets that was uploaded part of the release but not the archived source code itself. Please let me know if there is a plugin available in GitHub actions to call this.

sur
  • 345
  • 1
  • 3
  • 13

1 Answers1

0

I'm working on a complete github action to fetch release data of a github repository. I've seen so much different github actions which don't support everything I wanted.

You can use the github action to fetch release data https://github.com/marketplace/actions/github-release-data, it also outputs the tarball and zipball output url of the release.

        # Fetch release data of the current repository from where the workflow is used.
      - name: Get Release data
        id: release_data
        uses: KevinRohn/github-full-release-data@v2.0.0
    
      - name: Show tag name with echo
        run: echo ${{ steps.release_data.outputs.zipball_url }}

Alternative

If you can't wait until the above github action is finished you can also use a github action that already supports the download of tarball and zipball.

https://github.com/robinraju/release-downloader

The referenced github action is well documented.

- uses: robinraju/release-downloader@v1.3
  with:
    repository: "user/repo"
    latest: true
    tarBall: true
    zipBall: true
cigien
  • 57,834
  • 11
  • 73
  • 112
Kevin R.
  • 154
  • 1
  • 7