Upload Files or Globs as Release Assets with Custom Names.
- name: 'Upload Release'
uses: cssnr/upload-release-action@v1
with:
files: README.md- Upload Any File(s) or Glob(s) as Release Assets
- Automatically Detect the Release or Set Manually
- Option to Manually Set Asset File Name(s)
You must provide files or globs or both.
| Input | Default Value | Description of Input |
|---|---|---|
| globs | or files |
File Glob(s) |
| files | or globs |
File Path(s) |
| names | - | Asset File Name(s) |
| overwrite | false |
Overwrite Existing Files |
| id | - | Optional Release ID |
| tag | - | Optional Release Tag |
| latest | false |
Use Latest Release |
| summary | true |
Add Summary to Job |
| token | ${{ github.token }} |
GitHub Access Token PAT 1 |
- name: 'Upload Release'
uses: cssnr/upload-release-action@v1
with:
files: README.mdSee the Examples for usage options.
This action requires the following permissions:
permissions:
contents: writePermissions documentation for Workflows and Actions.
| Output | Description |
|---|---|
| assets | Assets Uploaded JSON |
- name: 'Upload Release'
id: release
uses: cssnr/upload-release-action@v1
with:
files: README.md
- name: 'Echo Output'
run: |
echo "assets: ${{ steps.release.outputs.assets }}"💡 Click on an example heading to expand or collapse the example.
With a file path.
- name: 'Upload Release'
uses: cssnr/upload-release-action@v1
with:
files: dist/app.jsWith a glob.
- name: 'Upload Release'
uses: cssnr/upload-release-action@v1
with:
globs: dist/**With multiple files or globs.
- name: 'Upload Release'
uses: cssnr/upload-release-action@v1
with:
globs: |
dist/**
src/*.js
files: |
README.md
package.jsonWith File Names.
- name: 'Upload Release'
uses: cssnr/upload-release-action@v1
with:
files: |
README.md
package.json
names: |
readme.txt
package-spec.jsonFull Workflow
name: 'Upload Release Action'
on:
workflow_dispatch:
release:
types: [published]
permissions:
contents: write
jobs:
release:
name: 'Release'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: 'Checkout'
uses: actions/checkout@v5
- name: 'Upload Release'
id: release
uses: cssnr/upload-release-action@v1
with:
files: README.md
- name: 'Echo Output'
run: |
echo "assets: ${{ steps.release.outputs.assets }}"For more examples, you can check out other projects using this action:
https://github.com/cssnr/upload-release-action/network/dependents
The following rolling tags are maintained.
| Version Tag | Rolling | Bugs | Feat. | Name | Target | Example |
|---|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | Major | vN.x.x |
vN |
|
| ✅ | ✅ | ❌ | Minor | vN.N.x |
vN.N |
|
| ❌ | ❌ | ❌ | Micro | vN.N.N |
vN.N.N |
You can view the release notes for each version on the releases page.
The Major tag is recommended. It is the most up-to-date and always backwards compatible. Breaking changes would result in a Major version bump. At a minimum you should use a Minor tag.
For general help or to request a feature, see:
- Q&A Discussion: https://github.com/cssnr/upload-release-action/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/upload-release-action/discussions/categories/feature-requests
If you are experiencing an issue/bug or getting unexpected results, you can:
- Report an Issue: https://github.com/cssnr/upload-release-action/issues
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
- Provide General Feedback: https://cssnr.github.io/feedback/
For more information, see the CSSNR SUPPORT.md.
If you would like to submit a PR, please review the CONTRIBUTING.md.
Please consider making a donation to support the development of this project and additional open source projects.
Additionally, you can support other GitHub Actions I have published:
- Stack Deploy Action
- Portainer Stack Deploy Action
- Docker Context Action
- Actions Up Action
- VirusTotal Action
- Mirror Repository Action
- Update Version Tags Action
- Docker Tags Action
- Update JSON Value Action
- JSON Key Value Check Action
- Parse Issue Form Action
- Cloudflare Purge Cache Action
- Mozilla Addon Update Action
- Package Changelog Action
- NPM Outdated Check Action
- Label Creator Action
- Algolia Crawler Action
- Upload Release Action
- Check Build Action
- Web Request Action
- Get Commit Action
❔ Unpublished Actions
These actions are not published on the Marketplace, but may be useful.
- cssnr/create-files-action - Create various files from templates.
- cssnr/draft-release-action - Keep a draft release ready to publish.
- cssnr/env-json-action - Convert env file to json or vice versa.
- cssnr/push-artifacts-action - Sync files to a remote host with rsync.
- smashedr/update-release-notes-action - Update release notes.
- smashedr/combine-release-notes-action - Combine release notes.
📝 Template Actions
These are basic action templates that I use for creating new actions.
- js-test-action - JavaScript
- ts-test-action - TypeScript
- py-test-action - Python (Dockerfile)
- docker-test-action - Docker (Image)
Note: The docker-test-action builds, runs and pushes images to GitHub Container Registry.
For a full list of current projects visit: https://cssnr.github.io/
Footnotes
-
The
${{ github.token }}/{{ secrets.GITHUB_TOKEN }}is automatically passed, there is no need to manually pass these! This is only available to allow users to pass a different token they have created and defined in theirsecrets. ↩