Upload release assets with GitHub Actions View article history Edit article

Published: , Updated:
Talks about: <a class="post-tag post-tag-asset" href="/tags/asset">asset</a>, <a class="post-tag post-tag-github" href="/tags/github">github</a>, <a class="post-tag post-tag-github-actions" href="/tags/github-actions">github actions</a>, <a class="post-tag post-tag-release" href="/tags/release">release</a>, and <a class="post-tag post-tag-upload" href="/tags/upload">upload</a>

The actions/upload-release-asset action allows to upload a release artifact in your GitHub Action.

name: <PIPELINE>
jobs:
  build:
    runs-on: <RUN_ON>
    steps:
      - name: Upload Release Asset
        id: upload_release_asset
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ steps.create_release.outputs.upload_url }}
          asset_path: ./some/path/to/file.zip
          asset_name: public-name-for-file.zip
          asset_content_type: application/zip