Skip to content

Repository files navigation

Upload To Github Release

Github Action for deploy files to github release.

Marketplace: https://github.com/marketplace/actions/upload-to-github-release

GitHub Actions statusGitHub release (latest by date)GitHub

Dependency: @actions/coreDependency: @actions/githubDependency: @actions/globbyDependency: mime

Dev dependency: typescriptDev dependency: @types/jestDev dependency: @types/nodeDev dependency: @zeit/nccDev dependency: jestDev dependency: jest-circusDev dependency: ts-jest

npmGitHub code size in bytesGitHub repo sizeGitHub forksGitHub stars

Example usage

uses: xresloader/upload-to-github-release@v1env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}with:
file: "*.md"tags: truedraft: true

You can find more samples on https://github.com/xresloader/upload-to-github-release-test/blob/master/.github/workflows/ .

Environments

GITHUB_TOKEN

Required The github token. You can set it to "${{ secrets.GITHUB_TOKEN }}" to use default token.

See https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line for details.

Inputs

file

Required The files or file patterns to upload. You can upload multiple files by split them by semicolon. You can use the glob pattern to find the files.

delete_file

Optional The files or file patterns to delete before uploading new files. You can delete multiple files by split them by semicolon. You can use the glob pattern to find the files.

overwrite

Optional If you need to overwrite existing files, add overwrite: true.

Default : false

draft

Optional The resultant deployment is a draft Release that only repository collaborators can see. This gives you an opportunity to examine and edit the draft release.

Default : true

We will only try to query the first 100 releases to find the draft release with the same name, because we can not get a draft release by tag name util it's published.

prerelease

Optional The resultant deployment is a Prerelease that only repository collaborators can see. This gives you an opportunity to examine and edit the prerelease.

Default : false

tags

Optional With tags: true, your Releases deployment will trigger if and only if the build is a tagged build.

Default : false

branches

Optional Only work on these branches, set to nothing to accept all branches.

Default : []

tag_name

Optional Set custom tag name.

Default : ""

update_latest_release

Optional With update_latest_release: true, this action will try to update latest release first.

Default : false

verbose

Optional Print the verbose logs to debug.

Default : false

release_id

Optional Set release id to update.If release_id is set, this step will fail if we can not find it.

Default : 0

Outputs

release_id

The release id.

release_name

The release name.

release_url

The release url.

release_tag_name

The release tag name.

release_commitish

The release commitish.

For Developer

We can use npm or yarn to build this action.

npm i -g yarn
yarn install
yarn run build
# commit
git add lib/* src/*
git commit -m "COMMIT MESSAGE"

Reference

titlelink
GitHub Actionshttps://github.com/features/actions
Creating a javascript actionhttps://help.github.com/en/articles/creating-a-javascript-action#testing-out-your-action-in-a-workflow
Events that trigger workflows - GitHub Helphttps://help.github.com/en/articles/events-that-trigger-workflows
The GitHub ToolKit for developing GitHub Actionshttps://github.com/actions/toolkit
GitHub GraphQL API v4https://developer.github.com/v4/
GitHub Rest API v3 for Releasehttps://developer.github.com/v3/repos/releases/
GitHub GraphQL API client for browsers and Nodehttps://github.com/octokit/graphql.js
GitHub REST API client for JavaScripthttps://octokit.github.io/rest.js/

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages