Skip to content

Latest commit

 

History

History
205 lines (165 loc) · 4.25 KB

README.md

File metadata and controls

205 lines (165 loc) · 4.25 KB

Release GitHub Actions CLI

CI Status codecov CodeFactor License: MIT

Read this in other languages: English, 日本語.

CLI tool of Release GitHub Actions.

Table of Contents

Details

Screenshot

Cli

Usage

For package

  1. Install

    yarn add --dev @technote-space/release-github-actions-cli
  2. Run command

    yarn release-ga --token <token> -t <tag>

    show help

    yarn release-ga -h

For global

  1. Install

    yarn global add @technote-space/release-github-actions-cli
  2. Run command

    release-ga --token <token> -p <package dir> -t <tag>

    show help

    release-ga -h

Args

Required

token

personal access token

e.g.

--token 1234567890

Not required if you have a .env file with token.
e.g.

token=1234567890

tag

detail

e.g.

--tag v1.2.3
-t v1.2.3

Not required if test option is set.

Option

branch

Branch name to use for build.
If this option is not specified, the current source code will be used.

e.g.

--branch release/v1.2.3
-b release/v1.2.3

dry run

Whether not to push.

e.g.

--dry-run
-n

package file directory

Directory where package.json file exists.

e.g.

--package /tmp/test-repo
-p /tmp/test-repo

test

Test mode

The tag name is determined from the latest tag.
test/ is set as the test tag prefix.

Settings

Release GitHub Actions CLI can be configured using .releasegarc, .releasegarc.json, .releasegarc.js, .releasega.config.js or releasega property in package.json.

e.g. .releasegarc

{
  "owner": "test-owner",
  "repo": "test-repo",
  "inputs": {
    "test-tag-prefix": "test/",
    "fetch-depth": "5"
  }
}

e.g. package.json

{
  "name": "test",
  "version": "1.0.0",
  "repository": {
  },
  "dependencies": {
  },
  "releasega": {
    "owner": "test-owner",
    "repo": "test-repo",
    "inputs": {
      "test-tag-prefix": "test/",
      "fetch-depth": "5"
    }
  }
}

OWNER

Use this option to specify the owner.
default: detect from url in package.json

REPO

Use this option to specify the repo.
default: detect from url in package.json

INPUTS

Use this option to set action inputs.
action.yml

e.g.

{
  "inputs": {
    "commit message": "test message",
    "commit-name": "test name",
    "COMMIT_EMAIL": "test@example.com"
  }
}

Author

GitHub (Technote)
Blog