简体   繁体   中英

how to download the archived GitHub Release Source code using GitHub Actions

我想知道是否可以下载存档的 GitHub 发布的源代码文件,该文件通常在使用 GitHub 操作的发布页面中被视为(源代码(zip)和源代码(tar.gz)。我看到很多操作下载发布资产的市场,我尝试了其中的一些,但大多数情况下他们只下载发布部分上传的资产,而不是存档的源代码本身。请告诉我 GitHub 操作中是否有可用的插件叫这个。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM