Day 7: Upload files to GitHub releases
December 07, 2019
upload-to-release by Jason Etcovich is an action which upload files into a release.
Example Usage
Say one manually creates a release, you can have a workflow that could build a docker image and upload the .tar output as a result. To run this, use the release
trigger.
name: build-docker-imageon: releasejobs:build-docker-image:name: Build and upload docker imageruns-on: ubuntu-lateststeps:- name: Pull sourceuses: actions/checkout@v1- name: Build Docker imageuses: actions/docker/cli@masterwith:args: build . -t my-image- name: Save the imageuses: actions/docker/cli@masterwith:args: save my-image:latest- name: Upload to releaseuses: JasonEtco/upload-to-release@masterwith:args: my-image.tarenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN
is the only required secret and the args
file takes a relative file and will attach it to the release.