GitHub
github.com › actions › upload-release-asset
GitHub - actions/upload-release-asset: An Action to upload a release asset via the GitHub Release API · GitHub
This GitHub Action (written in JavaScript) wraps the GitHub Release API, specifically the Upload a Release Asset endpoint, to allow you to leverage GitHub Actions to upload release assets.
Starred by 713 users
Forked by 200 users
Languages JavaScript
Videos
00:53
Publish Release Assets With The Github CLI #shorts - YouTube
Tip 9: Creating a GitHub release in a GitHub Actions workflow
11:16
Upload Assets to GitHub Releases using GitHub Actions - YouTube
03:34
Tip 6: Uploading artifacts in a GitHub Actions workflow - YouTube
06:19
Making a GitHub Action to automatically release your Python package ...
05:55
How to publish GitHub Actions artifacts example - YouTube
GitHub
github.com › basefas › upload-release-asset-action
GitHub - basefas/upload-release-asset-action: An Action to upload a release asset
The action wraps the GitHub Release API, specifically the Upload A Release Asset endpoint, to allow you to leverage GitHub Actions to upload release assets.
Author basefas
GitHub
github.com › AButler › upload-release-assets
GitHub - AButler/upload-release-assets: GitHub Action to upload assets to a Release
Starred by 69 users
Forked by 21 users
Languages TypeScript 100.0% | TypeScript 100.0%
GitHub
github.com › marketplace › actions › github-release-create-update-and-upload-assets
Github Release create, update, and upload assets · Actions · GitHub Marketplace · GitHub
Mark this release as a pre-release. false by default. more ... A space-separated list of files to be uploaded. When left empty, no files are uploaded. More on files below ... Set whether to gzip uploaded assets, or not. Available options are: true, false, and folders which uploads files unchanged, but compresses directories/folders.
GitHub
github.com › marketplace › actions › upload-files-to-a-github-release
Upload files to a GitHub release · Actions · GitHub Marketplace · GitHub
browser_download_url: The publicly available URL of the asset. release_id: The numerical ID of the created or updated release. This usage assumes you want to build on tag creations only. This is a common use case as you will want to upload release binaries for your tags. ... name: Publish on: push: tags: - '*' jobs: build: name: Publish binaries runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Build run: cargo build --release - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: target/release/mything asset_name: mything tag: ${{ github.ref }} overwrite: true body: "This is my release text"
Branislav Jenco
branislavjenco.github.io › github-actions-release
How to upload assets to an existing Release in Github Actions | Branislav Jenco
June 30, 2021 - Summary: use github.event.release.upload_url as the upload URL for Release assets when triggering a workflow on a published GitHub Release.
Top answer 1 of 2
12
A great way to create releases and other GitHub actions, is the GitHub CLI (gh).
The GitHub workflow already has a GitHub token ${{ secrets.GITHUB_TOKEN }} and you can pass it to the env, the CLI will automatically pick it up.
permissions:
contents: write
jobs:
release:
steps:
- run: |
gh release create v1.2.3 release.tar.xz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
name: Creates a release in GitHub and uploads attachments
Note: For some reason,
ghwill do one call to see if the file is already uploaded, the another call to upload the file. So I've burned through the API rate limits using this approach trying to attach 500 files to a release. Normally you should be able to do 1000 API calls per hour across workflows.
2 of 2
5
gh is a good solution. Or, if still needed to work with github-script, I confirmed that the following worked somehow (at least for a small file -- not tested with a large file, though), jfyi.
jobs:
publish:
permissions:
contents: write
steps:
# ...
- name: Upload an Asset in GitHub Release
uses: "actions/github-script@v6"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
script: |
const fs = require('fs').promises;
await github.rest.repos.uploadReleaseAsset({
name: 'README.md',
owner: context.repo.owner,
repo: context.repo.repo,
release_id: ${{ env.RELEASE_ID }},
data: await fs.readFile('./README.md') # The file to upload.
});
GitHub
github.com › shogo82148 › actions-upload-release-asset
GitHub - shogo82148/actions-upload-release-asset: Yet Another Upload Release Asset Action
- name: Upload Assets uses: shogo82148/actions-upload-release-asset@v1 with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: assets.txt # shogo82148/actions-create-release publishes the release in the end of the job.
Starred by 89 users
Forked by 7 users
Languages TypeScript 95.7% | Shell 2.4% | JavaScript 1.9% | TypeScript 95.7% | Shell 2.4% | JavaScript 1.9%
Thomas Stringer
trstringer.com › github-actions-create-release-upload-artifacts
Create a Release and Upload Artifacts with GitHub Actions | Thomas Stringer
January 17, 2021 - Then likewise you set the asset_path to the artifact to upload, and asset_name to what you want it named in the release. Finally you set the asset_content_type appropriately. In my case, this is application/gzip for the tarballs and application/zip for the zip file. And there it is! With these steps in your GitHub Action ...
Medium
medium.com › @thorstensuckow › downloadable-assets-with-github-actions-e39b76371337
Downloadable Assets with GitHub Actions | Medium
May 20, 2022 - Note: At this point, the checkout action is not really necessary, since the create-release action does not depend on it and will work just fine without it. We’ll get back to it shortly. ... Releases are ordered by their most recent date. A Release’s downloadable assets can be found here, by default providing a tar and a zip of the checked out repository-contents. We’re missing a few more steps — the build and the upload of a deployable build so we can access it as a downloadable asset.
GitHub
github.com › marketplace › actions › upload-release-assets-with-folder
Upload Release Assets with folder · Actions · GitHub Marketplace · GitHub
browser_download_urls - the paths to download the uploaded assets · name: publish on: push: tags: - '*' jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@master with: fetch-depth: 1 - name: Make all run: make all - name: Upload release binaries uses: alexellis/upload-assets@0.2.2 env: GITHUB_TOKEN: ${{ github.token }} with: asset_paths: '["./bin/release-it*"]'
GitHub
github.com › actions › upload-release-asset › releases
Releases · actions/upload-release-asset
March 4, 2021 - This Action wraps the upload-release-asset endpoint to upload a release asset to a GitHub Release.
Author actions