Skip to content

Traphalet/upload-assets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

upload-assets

GitHub Action to upload multiple assets to a release

Features

This action aims to resolve several outstanding user requests with @actions/upload-release-asset.

  • Getting the latest release tag for upload
  • Globbing i.e. ./bin/*
  • Succinct - no need to populate content_type and a separate path input

Requirements:

You can run into a "socket hangup", if you do, then add permissions for the action to write to contents.

    permissions:
      contents: write

      actions: read
      checks: write
      issues: read
      packages: write
      pull-requests: read
      repository-projects: read
      statuses: read

Built for developers by developers

Sponsor this project

If you're using this action, consider becoming a sponsor so that I can continue to dedicate time to maintaining it.

Input variables

You must provide:

  • asset_paths - the paths to the assets you want to upload as a JSON array. You can use a glob pattern. For example asset_paths: '["bin/*", "dist/js/*"]'

Output variables

  • browser_download_urls - the paths to download the uploaded assets

Example

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*"]'

Example taken from this sample project.

Creating a new version

Getting started:

npm i -g  @vercel/ncc

Build:

npm i
npm run build

License

MIT

Contribution guide

  1. Any contributions must be proposed via a GitHub issue for discussion before being worked on.
  2. You should also use git commit -s and follow the DCO.

About

GitHub Action to upload multiple assets to a release

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 99.7%
  • Makefile 0.3%