Coder Social home page Coder Social logo

release-action's Introduction

Release Action

This action will create a github release and optionally upload an artifact to it.

Action Inputs

  • allowUpdates: An optional flag which indicates if we should update a release if it already exists. Defaults to false.
  • artifact: An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs).
  • artifacts: An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs).
  • artifactContentType: The content type of the artifact. Defaults to raw.
  • body: An optional body for the release.
  • bodyFile: An optional body file for the release. This should be the path to the file.
  • commit: An optional commit reference. This will be used to create the tag if it does not exist.
  • draft: Optionally marks this release as a draft release. Set to true to enable.
  • name: An optional name for the release. If this is omitted the tag will be used.
  • omitBody: Indicates if the release body should be omitted.
  • omitBodyDuringUpdate: Indicates if the release body should be omitted during updates. The body will still be applied for newly created releases. This will preserve the existing body during updates.
  • omitName: Indicates if the release name should be omitted.
  • omitNameDuringUpdate: Indicates if the release name should be omitted during updates. The name will still be applied for newly created releases. This will preserve the existing name during updates.
  • owner: Optionally specify the owner of the repo where the release should be generated. Defaults to current repo's owner.
  • prerelease: Optionally marks this release as prerelease. Set to true to enable.
  • replacesArtifacts: Indicates if existing release artifacts should be replaced. Defaults to true.
  • repo: Optionally specify the repo where the release should be generated. Defaults to current repo.
  • tag: An optional tag for the release. If this is omitted the git ref will be used (if it is a tag).
  • token: (Required) The Github token. Typically this will be ${{ secrets.GITHUB_TOKEN }}.

Example

This example will create a release when tag is pushed:

name: Releases

on: 
  push:
    tags:
    - '*'

jobs:

  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: ncipollo/release-action@v1
      with:
        artifacts: "release.tar.gz,foo/*.txt"
        bodyFile: "body.md"
        token: ${{ secrets.GITHUB_TOKEN }}

Notes

  • You must provide a tag either via the action input or the git ref (i.e push / create a tag). If you do not the action will fail.
  • If the tag of the release you are creating does not exist yet, you should set both the tag and commit action inputs. commit can point to a commit hash or a branch name (ex - main).

release-action's People

Contributors

dependabot[bot] avatar ncipollo avatar zertz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.