Skip to content

randlabs/uploadasset-action

Repository files navigation

uploadasset-action

A GitHub Action to upload assets to an existing release written in TypeScript

License Issues

Usage

    ...
    - name: Uploading binaries to release
      id: uploadbin
      uses: randlabs/uploadasset-action@v1.0.0
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag: mytag
    ...

Inputs

inputs:
  release_id:
    description: 'The ID of the release where files must be uploaded.'
    required: false
  tag:
    description: 'The release tag where files must be uploaded if an ID is not provided. If tag is also empty, the action will try to determine the release id based on the execution context.'
    required: false
  files:
    description: 'A multi-line list of files. If an item contains wildcard, a glob search will be executed.'
    required: true
  delete_filemask:
    description: 'If specified, deletes all existing assets that matches any of the wildcard patterns.'
    required: false
  overwrite:
    description: 'Tries to overwrite an asset if it already exists.'
    required: false
  repo:
    description: 'Target repository in <owner-or-company>/<repository> format.'
    required: false

Outputs

outputs:
  assets:
    description: 'A JSON array containing id and download url of each uploaded asset.'

Permissions

This Action requires the following permissions on the GitHub integration token:

permissions:
  contents: write

Environment variables:

GITHUB_TOKEN must be set to the workflow's token or the personal access token (PAT) required to accomplish the task.