• Stars
    star
    177
  • Rank 215,985 (Top 5 %)
  • Language
    Shell
  • License
    MIT License
  • Created almost 6 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A GitHub Action that uploads a file to a new release.

Upload to Release

A GitHub Action that uploads a file to a new release.

Usage

This action uploads any file to a new release:

image

One example workflow is to build and save a Docker image then upload it to a release:

# .github/workflows/build-docker-image.yml
name: build-docker-image

on: release

jobs:
  build-docker-image:
    name: Build and upload docker image
    runs-on: ubuntu-latest
    steps:
      - name: Pull source
        uses: actions/checkout@v1

      - name: Build Docker image
        uses: actions/docker/cli@master
        with:
          args: build . -t my-image

      - name: Save the image
        uses: actions/docker/cli@master
        with:
          args: save my-image:latest

      - name: Upload to release
        uses: JasonEtco/upload-to-release@master
        with:
          args: my-image.tar
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Requirements

You must pass at least one argument, the path to the file you want to attach. You must also include the GITHUB_TOKEN secret, otherwise uploading the file will not work.

- name: Upload to release
  uses: JasonEtco/upload-to-release@master
  with:
    args: my-image.tar
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Content-Type

You may also need to pass an additional argument, the Content-Type header used when uploading your file (this is application/zip by default):

- name: Upload to release
  uses: JasonEtco/upload-to-release@master
  with:
    args: my-image.tar application/zip
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Event type

The event type your workflow is triggered from is critical to the function of this action. If you are not using on: release for your workflow this action will not work correctly.

The event sent to the action by GitHub only contains an artifact upload URL when using the release event type to trigger the workflow.

If you need other workflows not based on the release event, you should use multiple workflow definitions.

More Repositories

1

actions-toolkit

🛠 A toolkit for building GitHub Actions in Node.js
TypeScript
928
star
2

todo

🤖✅ GitHub App that creates new issues from actionable comments in your code.
JavaScript
741
star
3

create-an-issue

A GitHub Action for creating a new issue from a template file.
TypeScript
268
star
4

rss-to-readme

📡📝 A GitHub Action that updates a section of a README from an RSS feed.
TypeScript
221
star
5

is-sponsor-label-action

💖🔖 A GitHub Action that labels issues/PRs if the author sponsors the owner of the repo
JavaScript
221
star
6

activity-box

⚡️📌 Update a pinned gist to contain the latest activity of a user
JavaScript
212
star
7

build-and-tag-action

📦🔖 A GitHub Action for publishing JavaScript Actions
TypeScript
94
star
8

gist-box

📌📋 A helper class for updating a single-file Gist
TypeScript
84
star
9

action-badges

🛡⚡️ A README badge service for GitHub Actions
JavaScript
61
star
10

ci-reporter

🚧📝 GitHub App to show CI failure logs in PR comments
JavaScript
48
star
11

flintcms

🔥💥 A Node.js CMS
JavaScript
45
star
12

readme-box

📝⚙️ Lil' helper for replacing a section of the contents of a README.
TypeScript
31
star
13

npm-audit-fix-action

[WIP] GitHub Action that opens a pull request following an npm audit fix
JavaScript
29
star
14

jasonet.co

📝 My personal site and blog
Nunjucks
27
star
15

readme-guestbook

A little web app that transforms a README into a guestbook.
HTML
21
star
16

good-first-pin

🤖📌 A GitHub App built with Probot that rotates pinned issues based on Good First Issue labels
TypeScript
16
star
17

octokit-create-new-file

Creates a new file on a new branch and opens a new pull request.
JavaScript
15
star
18

action-record

📑 An "ORM" for storing data to a GitHub repository using GitHub Actions
TypeScript
13
star
19

smee-action

🔴📜 Use smee.io to debug GitHub Action runs
JavaScript
13
star
20

JasonEtco

11
star
21

slash-assign-action

A GitHub Action that listens for a `/assign` "command" and assigns the commenter to the issue.
TypeScript
10
star
22

github-user-status

A CLI for setting your GitHub user status
TypeScript
9
star
23

progressvg

💯% Progress bar as a service
JavaScript
6
star
24

push-to-gh-pages

📦💻 A GitHub Action that pushes a directory to the gh-pages branch
Shell
6
star
25

test-selector

🎭👈 Prompts the user to run specific test suites in a project.
JavaScript
6
star
26

validate-semver-release

🔖🤔 GitHub Action that validates GitHub Releases against semantic versioning
JavaScript
6
star
27

emojify-everything

🍆🔥💯 There aren't enough emojis in your websites. This extension fixes that.
JavaScript
6
star
28

signoff-commit-action

✍️ Action that creates an empty commit with a list of commits to "sign off on"
6
star
29

craft-emailwhitelist

🔒✉ A whitelist of emails for Craft
PHP
5
star
30

dotfiles

💻 Public repo for my personal dotfiles.
Shell
3
star
31

actions-counter

JavaScript
3
star
32

flintcms-site

📙 Landing page & Docs for FlintCMS
CSS
2
star
33

nunjucks-octicons-extension

A Nunjucks extension for using Octicons
JavaScript
2
star
34

jolt

CSS
2
star
35

text-to-emoji

JavaScript
2
star
36

streamydoo

Easy to use stream request handler for your browser
JavaScript
1
star
37

hover

Example of WebSockets using hover behaviors
JavaScript
1
star
38

find-code

🔍💻 Find code snippets in your project
JavaScript
1
star
39

business-card

JavaScript
1
star
40

notarikon4d

JavaScript
1
star
41

tote

[WIP] 👜 tote, a markdown note-taking PWA
JavaScript
1
star
42

khaliun-batmunkh

JavaScript
1
star
43

url-shortener

🔗 URL Shortener, built on a 🚆
JavaScript
1
star
44

grunt-jekyll-post

Prompts questions in command line, then creates a Jekyll post template with the answers.
JavaScript
1
star
45

talks

A repo to store my conference talk slide decks
1
star
46

nunjucks-pre-lexer

🤓 A tool for identifying and fetching the data that a Nunjucks template expects
TypeScript
1
star
47

notarikon

Notarikon means deriving a word from the first letter of each word in a sentence (using an anagram)
JavaScript
1
star
48

smee-client-rb

[WIP]: A programmatic client for Smee, in Ruby.
Ruby
1
star
49

dinner

🦃 Cyberspace Thanksgiving Dinner, with all the people you'd expect.
JavaScript
1
star
50

nunjucks-await-filter

Brings async/await functions to your Nunjucks templates.
JavaScript
1
star
51

server-smee-action

An Action for Servers with Smee
TypeScript
1
star
52

a-learning-lab-course-template

The template repository for the a-learning-lab-course course on Learning Lab.
1
star
53

ondesign-xyz

JavaScript
1
star
54

revolution

JavaScript
1
star
55

personal-site

🌈👌😁 My personal website and portfolio
JavaScript
1
star
56

discord-namer

🎮 Changes my Discord nickname when I'm @-mentioned, using a random emoji.
JavaScript
1
star
57

github-bulk-transfer

Simple CLI utility to trigger bulk transfers of github repos through a headless browser
JavaScript
1
star