Skip to content

cssnr/upload-release-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

GitHub Tag Major GitHub Tag Minor GitHub Release Version GitHub Dist Size Workflow Release Workflow Lint Quality Gate Status GitHub Last Commit Codeberg Last Commit GitHub Contributors GitHub Repo Size GitHub Top Language GitHub Discussions GitHub Forks GitHub Repo Stars GitHub Org Stars Discord Ko-fi

Upload Release Action

Upload Files or Globs as Release Assets with Custom Names.

- name: 'Upload Release'
  uses: cssnr/upload-release-action@v1
  with:
    files: README.md

Features

  • 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)

Inputs

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.md

See the Examples for usage options.

Permissions

This action requires the following permissions:

permissions:
  contents: write

Permissions documentation for Workflows and Actions.

Outputs

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 }}"

Examples

💡 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.js

With 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.json

With File Names.

- name: 'Upload Release'
  uses: cssnr/upload-release-action@v1
  with:
    files: |
      README.md
      package.json
    names: |
      readme.txt
      package-spec.json
Full 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

Tags

The following rolling tags are maintained.

Version Tag Rolling Bugs Feat. Name Target Example
GitHub Tag Major Major vN.x.x vN
GitHub Tag Minor Minor vN.N.x vN.N
GitHub Release 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.

Support

For general help or to request a feature, see:

If you are experiencing an issue/bug or getting unexpected results, you can:

For more information, see the CSSNR SUPPORT.md.

Contributing

Please consider making a donation to support the development of this project and additional open source projects.

Ko-fi

If you would like to submit a PR, please review the CONTRIBUTING.md.

Additionally, you can support other GitHub Actions I have published:

❔ Unpublished Actions

These actions are not published on the Marketplace, but may be useful.


📝 Template Actions

These are basic action templates that I use for creating new actions.

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

  1. 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 their secrets.

About

Upload Files or Globs as Release Assets with Custom Names.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project