GithubHelp home page GithubHelp logo

therealwaldo / release-it Goto Github PK

View Code? Open in Web Editor NEW
9.0 0.0 0.0 6.16 MB

Github Action to leverage release-it in Github repositories

License: GNU General Public License v3.0

JavaScript 5.38% TypeScript 94.62%

release-it's Introduction

release-it Github Action

Tests

Github Action to leverage release-it in Github repositories. Must be used with actions/checkout@v2 or above.

Usage of plugins for release-it requires them to be installed in your workspace before hand.

For a node application just do:

npm install -D release-it

See release-it/release-it for details on how release-it itself works.

For plugins, do the same! Take the super useful release-it/bumper:

npm install -D @release-it/bumper

Inputs

github-token

The Github token to pass to release-it.

Defaults to ${{ github.token }}.

no-increment

Whether release-it should increment the version or not.

Defaults to false.

debug

Whether to run release-it in debug mode or not.

Defaults to false.

json-opts

Adds additional options to the release-it command as a serialized Json object. For example, '{"dry-run": true}'.

Defaults to {}.

github-username

Set the Github username to use for creating/pushing updates.

Defaults to ${{ github.actor }}

git-user-name

Set the git user name to use when release-it commits.

Defaults to release-it bump.

git-user-email

Set the git email address to use when release-it commits.

Defaults to env.GITHUB_EMAIL.

create-branch

Name of branch to create before pushing. If not set, or empty, does not create a branch.

Useful if target branch is secured or locked from direct pushes.

auto-resolve-command

Shell command to execute if a conflict occurs.

Useful if you are commiting build artifacts such as minized code.

rebase-onto

Branch to rebase onto.

Defaults to the branch that triggered action and will not rebase onto itself.

Outputs

json-result

Serialized Json return object from release-it.

Example:

{
  name: 'gh-action-release-it',
  changelog: undefined,
  latestVersion: '0.990.3',
  version: '0.990.4'
}

version

version returned from release-it

latestVersion

latestVersion returned from release-it

changelog

changelog returned from release-it

Example Usage

- name: Checkout
  uses: actions/[email protected]
  with:
    fetch-depth: 0
    # The Checkout actions at v2 and beyond prevent pushes as another user due to persist-credentials being set to true by default
    persist-credentials: false

- name: release-it
  uses: TheRealWaldo/[email protected]
  with:
    json-opts: '{"dry-run": true}'

release-it's People

Contributors

dependabot[bot] avatar therealwaldo avatar trw-bot avatar

Stargazers

Simon Kreuzer avatar Maxime Daudé avatar Jonas Strassel avatar Dishant Kamble avatar Marissa Montgomery avatar Efstathios Ntonas avatar Nikolay avatar Arno Moonen avatar  avatar

release-it's Issues

Expose version as separate output

Motivation

Currently the action exposes only single output as JSON string.
This is not really convenient because requires parsing of JSON to access new version in subsequent steps.

Proposal

Create dedicated output named version and expose new version there after step completion.

Result

Instead

- name: release-it
  id: releaseIt
  uses: TheRealWaldo/[email protected]
  with:
    json-opts: '{"dry-run": true}'
- run: echo ${{ fromJson(steps.releaseIt.outputs.json-result).version }}

One could write

- name: release-it
  id: releaseIt
  uses: TheRealWaldo/[email protected]
  with:
    json-opts: '{"dry-run": true, "ci": true}'
- run: echo ${{ steps.releaseIt.outputs.version }}

Action updates release instead of creates new release

Describe the bug
It appears that when this is setup exactly how it is in this repository, publishing to github results in the latest release being updated instead of creating a new one. As a result, you lose history of releases

To Reproduce
Steps to reproduce the behavior:

  1. Release new version of this repository

Expected behavior
A new release is created on every release

Additional context
You can see this in action in this action's repo and goto releases.

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.