Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexellis/upload-assets
GitHub Action to upload multiple assets to a release
https://github.com/alexellis/upload-assets
Last synced: 13 days ago
JSON representation
GitHub Action to upload multiple assets to a release
- Host: GitHub
- URL: https://github.com/alexellis/upload-assets
- Owner: alexellis
- License: mit
- Created: 2020-11-02T13:24:44.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-22T13:02:51.000Z (4 months ago)
- Last Synced: 2024-10-14T14:11:15.393Z (29 days ago)
- Language: JavaScript
- Size: 345 KB
- Stars: 34
- Watchers: 3
- Forks: 17
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/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## Check out my eBooks 📖 🤓
[You can sponsor me on GitHub](https://github.com/sponsors/alexellis/), or check out my eBooks on Golang for Cloud Native Developers or Node.js for Serverless
Visit my: [eBook store](https://store.openfaas.com) 📖 🤓
## Requirements:
You can run into a "socket hangup", if you do, then add permissions for the action to write to contents.
```yaml
permissions:
contents: write
checks: writeactions: read
issues: read
packages: write
pull-requests: read
repository-projects: read
statuses: read
```## 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
```yaml
name: publishon:
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/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["./bin/release-it*"]'
```Example taken from [this sample project](https://github.com/alexellis/release-it/blob/master/.github/workflows/publish.yaml).
## Creating a new version
Getting started:
```bash
npm i -g @vercel/ncc
```Build:
```bash
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](https://developercertificate.org).