Skip to content

Commit

Permalink
Add generate changelog action (#191)
Browse files Browse the repository at this point in the history
* Update changelog script

* Add generate changelog action

* Update release procedure
  • Loading branch information
MartinHjelmare committed Mar 10, 2020
1 parent fdb62a0 commit 69c2b21
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 9 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/generate-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Generate changelog

on:
release:
types: [published]

jobs:
generate_changelog:
runs-on: ubuntu-latest
name: Generate changelog for default branch
steps:
- uses: actions/checkout@v2

- name: Generate changelog
uses: charmixer/auto-changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
release_branch: develop
base: HISTORY.md
since_tag: "0.7.0"

- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && echo ::set-env name=push::1 || echo "No changes to CHANGELOG.md"
- name: Push changes
if: env.push == 1
uses: ad-m/github-push-action@0.5.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

**Merged pull requests:**

- 0.7.3 [\#189](https://github.com/CellProfiling/cam_acq/pull/189) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix release and publish actions [\#188](https://github.com/CellProfiling/cam_acq/pull/188) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Bump version to 0.7.3.dev0 [\#187](https://github.com/CellProfiling/cam_acq/pull/187) ([MartinHjelmare](https://github.com/MartinHjelmare))

Expand Down
38 changes: 38 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
## [0.6.0](https://github.com/CellProfiling/cam_acq/tree/0.6.0) (2020-02-14)
[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.5.0...0.6.0)

**Breaking Changes:**

- Replace os.path with pathlib [\#169](https://github.com/CellProfiling/cam_acq/pull/169) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Refactor sample [\#165](https://github.com/CellProfiling/cam_acq/pull/165) ([MartinHjelmare](https://github.com/MartinHjelmare))

**Closed issues:**

- Replace str.format with f-strings [\#168](https://github.com/CellProfiling/cam_acq/issues/168)

**Merged pull requests:**

- 0.6.0 [\#174](https://github.com/CellProfiling/cam_acq/pull/174) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Use leicaimage instead of leicaexperiment [\#173](https://github.com/CellProfiling/cam_acq/pull/173) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Scheduled monthly dependency update for February [\#172](https://github.com/CellProfiling/cam_acq/pull/172) ([pyup-bot](https://github.com/pyup-bot))
- Change license to Apache 2.0 [\#171](https://github.com/CellProfiling/cam_acq/pull/171) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Make toggle automation more robust [\#170](https://github.com/CellProfiling/cam_acq/pull/170) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Convert format strings to f-strings [\#167](https://github.com/CellProfiling/cam_acq/pull/167) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Order automations functions and classes logically [\#166](https://github.com/CellProfiling/cam_acq/pull/166) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.5.0](https://github.com/CellProfiling/cam_acq/tree/0.5.0) (2019-12-12)
[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.4.0...0.5.0)

**Breaking Changes:**

- Remove gain plugin [\#162](https://github.com/CellProfiling/cam_acq/pull/162) ([MartinHjelmare](https://github.com/MartinHjelmare))

**Merged pull requests:**

- 0.5.0 [\#164](https://github.com/CellProfiling/cam_acq/pull/164) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix make\_proj [\#163](https://github.com/CellProfiling/cam_acq/pull/163) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Add lint to scripts [\#161](https://github.com/CellProfiling/cam_acq/pull/161) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix travis pypi deploy round 2 [\#160](https://github.com/CellProfiling/cam_acq/pull/160) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Fix travis pypi deploy [\#159](https://github.com/CellProfiling/cam_acq/pull/159) ([MartinHjelmare](https://github.com/MartinHjelmare))
- Update manifest to exclude more files [\#158](https://github.com/CellProfiling/cam_acq/pull/158) ([MartinHjelmare](https://github.com/MartinHjelmare))

## [0.4.0](https://github.com/CellProfiling/cam_acq/tree/0.4.0) (2019-12-07)
[Full Changelog](https://github.com/CellProfiling/cam_acq/compare/0.3.1...0.4.0)

Expand Down
1 change: 0 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
It's important to name it correctly to allow the github release action to work.
- Merge `master` branch into the release branch `rc` to make the PR mergeable.
- Update version in `VERSION`to the new version number, eg `'0.2.0'`.
- Update `CHANGELOG.md` by running `scripts/gen_changelog`.
- Commit and push the release branch.
- Create a pull request from release branch `rc` to `master` with the upcoming release number as the title. Put the changes for the new release from the updated changelog as the PR message.
- Add a label to the pull request, `patch`, `minor` or `major`. This will allow the github release action to work.
Expand Down
9 changes: 1 addition & 8 deletions scripts/gen_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
GITHUB_PROJECT = "cam_acq"
GITHUB_USER = "CellProfiling"
HISTORY_FILE = "HISTORY.md"
# Change this to 0.5.0 after changelog is generated when releasing 0.5.0.
TAG_SINCE = "0.5.0"
TAG_SINCE = "0.7.0"


def validate_version():
Expand Down Expand Up @@ -46,12 +45,6 @@ def generate():
"--project",
GITHUB_PROJECT,
"-v",
"--with-unreleased",
"--future-release",
version,
"--section",
"**Breaking Changes:**",
"breaking change",
"--since-tag",
TAG_SINCE,
"--base",
Expand Down

0 comments on commit 69c2b21

Please sign in to comment.