MattiSG / release-changelog-action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keep a Changelog release

Use this Github action to release unreleased changes in your changelog. Keep a Changelog format is supported.

Operation release changelog

  • Unreleased section is released as new version
  • Compare links are updated
  • Empty unreleased section is created
  • Updated changelog is returned

Operation read version changelog

  • Returns changelog of concrete version

Release changelog example

name: Release software
on:
  ...

jobs:
  release:
    steps:
      - uses: actions/checkout@v2
      - name: Update changelog
        uses: @superfaceai/release-changelog-action@v1
        with:
          path-to-changelog: CHANGELOG.md
          version: 1.0.0
          operation: release

Read version changelog example

  name: Get version changelog
  on:
    ...

  jobs:
    get-changelog:
      steps:
        - uses: actions/checkout@v2
        - name: Get changelog
          id: get-changelog
          uses: @superfaceai/release-changelog-action@v1
          with:
            path-to-changelog: CHANGELOG.md
            version: 1.0.0
            operation: read
        - name: Log changelog
          run: echo ${{ steps.get-changelog.outputs.changelog }}

Development

Install the dependencies

$ yarn install

Run tests

$ yarn test

Build and package it for distribution

$ yarn build && yarn package

Publish action to a distribution

Actions are run from GitHub repos so we will checkin the packed dist folder.

Then run ncc and push the results:

$ npm run package
$ git add dist
$ git commit -a -m "chore: prod dependencies"

After testing you can create a v1 tag to reference the stable and latest V1 action

About

License:MIT License


Languages

Language:TypeScript 95.8%Language:JavaScript 4.2%