0.8.1 • Published 2 years ago

@tryghost/release-utils v0.8.1

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

Release Utils

Install

npm install @tryghost/release-utils --save

or

yarn add @tryghost/release-utils

Usage

Create Gist:

const releaseUtils = require('@tryghost/release-utils');


releaseUtils
    .gist
    .create({
        userAgent: String,
        gistName: String,
        gistDescription: String,
        changelogPath: String [Path on Disk]
        github: {
            username: String
            token: String
        },
        isPublic: Boolean [optional, Default: true]
    })

Create Changelog:

const releaseUtils = require('@tryghost/release-utils');


const changelog = new releaseUtils.Changelog({
    changelogPath: String [Path on Disk],
    folder: String [Path on Disk]
});

changelog
    .write({
        githubRepoPath: String,
        lastVersion: String
    })
    .write({
        githubRepoPath: String
        lastVersion: String
        append: Boolean [optional, Default: false],
        folder: String [optional, Path on Disk]
    })
    .sort()
    .clean()

Create & Upload Release:

const releaseUtils = require('@tryghost/release-utils');


releaseUtils
    .releases
    .create({
        tagName: String,
        releaseName: String,
        userAgent: String,
        uri: String,
        github: {
            username: String,
            token: String,
        },
        changelogPath: String [Path on Disk] OR Array[{
            changelogPath: String [Path on Disk],
            content: Array [optional]
        }],
        gistUrl: String [optional],
        preRelease: Boolean [optional, Default: false],
        draft: Boolean [optional, Default: true],
        filterEmojiCommits: Boolean [optional, Default: true],
        content: Array [optional]
    });

releaseUtils
    .releases
    .uploadZip({
        github: {
            username: String,
            token: String
        },
        zipPath: String [Path on Disk],
        uri: String,
        userAgent: String
    })

Develop

This is a mono repository, managed with lerna.

Follow the instructions for the top-level repo. 1. git clone this repo & cd into it as usual 2. Run yarn to install top-level dependencies.

Run

  • yarn dev

Test

  • yarn lint run just eslint
  • yarn test run lint and tests

Copyright & License

Copyright (c) 2013-2022 Ghost Foundation - Released under the MIT license.

0.8.1

2 years ago

0.7.15

2 years ago

0.7.14

2 years ago

0.8.0

2 years ago

0.7.13

2 years ago

0.7.12

2 years ago

0.7.11

2 years ago

0.7.10

2 years ago

0.7.9

2 years ago

0.7.6

2 years ago

0.7.5

2 years ago

0.7.8

2 years ago

0.7.7

2 years ago

0.7.2

2 years ago

0.7.4

2 years ago

0.7.3

2 years ago

0.7.1

3 years ago

0.6.17

3 years ago

0.7.0

3 years ago

0.6.16

3 years ago

0.6.15

3 years ago

0.6.14

3 years ago

0.6.13

3 years ago

0.6.12

3 years ago

0.6.11

3 years ago

0.6.10

3 years ago

0.6.9

3 years ago

0.6.8

4 years ago

0.6.7

4 years ago

0.6.6

4 years ago

0.6.5

4 years ago

0.6.4

4 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.1

5 years ago