From c8c0253b2b54d2b8cacf71d9e46ac46868fe35c9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 29 Jan 2021 14:30:20 +0000 Subject: [PATCH] feat: build for release --- CHANGELOG.md | 10 ++++++++++ README.md | 22 +++++++++++++--------- release/index.js | 4 ++-- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a71e1e0..d8032bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# [2.0.3] - 2021-1-25 [PR: #13](https://github.com/dolittle/add-to-changelog-action/pull/13) +## Summary + +The changelog file should be committed before the release is created in order for the new changelog to be a part of the release. + +### Fixed + +- Release after changelog is committed + + # [2.0.2] - 2021-1-25 [PR: #12](https://github.com/dolittle/add-to-changelog-action/pull/12) ## Summary diff --git a/README.md b/README.md index ed1a76d..3f17ae9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # GitHub Action - Add To Changelog ![Github JavaScript Actions CI/CD](https://github.com/dolittle/add-to-changelog-action/workflows/Github%20JavaScript%20Actions%20CI/CD/badge.svg) -This GitHub action prepends the release note from the PR body to the CHANGELOG.md file and commits and pushes the file to the current branch. +This GitHub action prepends the release note from the PR body to the `CHANGELOG.md` file. It then commits and pushes the file. ### Inputs - `version`: The version released @@ -36,6 +36,7 @@ jobs: - run: yarn - run: yarn release + # this outputs the PR body - name: Establish context id: context uses: dolittle/establish-context-action@v2 @@ -48,25 +49,28 @@ jobs: version: ${{ steps.context.outputs.current-version }} release-type: ${{ steps.context.outputs.release-type }} - - name: Create GitHub Release - if: ${{ steps.context.outputs.should-publish == 'true' }} - uses: dolittle/github-release-action@v2 - with: - token: ${{ secrets.BUILD_PAT }} - version: ${{ steps.increment-version.outputs.next-version }} - body: ${{ steps.context.outputs.pr-body }} - - name: Prepend to Changelog if: ${{ steps.context.outputs.should-publish == 'true' }} uses: dolittle/add-to-changelog-action@v2 with: version: ${{ steps.increment-version.outputs.next-version }} + # input for the text to prepend to body: ${{ steps.context.outputs.pr-body }} pr-url: ${{ steps.context.outputs.pr-url }} + # path to changelog changelog-path: CHANGELOG.md + # for committing and pushing user-email: some-email@company.com user-name: some-name token: ${{ github.token }} + + - name: Create GitHub Release + if: ${{ steps.context.outputs.should-publish == 'true' }} + uses: dolittle/github-release-action@v2 + with: + token: ${{ secrets.BUILD_PAT }} + version: ${{ steps.increment-version.outputs.next-version }} + body: ${{ steps.context.outputs.pr-body }} ``` ## Contributing diff --git a/release/index.js b/release/index.js index a1932e3..9c5dc26 100644 --- a/release/index.js +++ b/release/index.js @@ -1790,7 +1790,7 @@ function register (state, name, method, options) { Object.defineProperty(exports, '__esModule', { value: true }); -const VERSION = "2.8.2"; +const VERSION = "2.9.0"; /** * Some “list” response that can be paginated have a different response structure @@ -7005,7 +7005,7 @@ const Endpoints = { } }; -const VERSION = "4.8.1"; +const VERSION = "4.9.0"; function endpointsToMethods(octokit, endpointsMap) { const newMethods = {};