diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 00000000..d199ab42 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,10 @@ +name-template: "$NEXT_PATCH_VERSION 🌈" +tag-template: "$NEXT_PATCH_VERSION" +categories: + - title: "Breaking changes:" + labels: + - "breaking change" +template: | + ## Merged pull requests: + + $CHANGES diff --git a/.github/workflows/check-rc.yml b/.github/workflows/check-rc.yml deleted file mode 100644 index 398a06cd..00000000 --- a/.github/workflows/check-rc.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Check release candidate - -on: - pull_request: - branches: [master] - types: [labeled, unlabeled, synchronize] - -jobs: - check-rc: - runs-on: ubuntu-latest - steps: - - uses: zwaldowski/match-label-action@v1 - with: - allowed: | - major - minor - patch diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml new file mode 100644 index 00000000..09489e44 --- /dev/null +++ b/.github/workflows/draft-release.yml @@ -0,0 +1,16 @@ +name: Draft release + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - develop + +jobs: + update-release-draft: + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "develop" + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a9269607..825978f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,8 @@ +name: Release + on: - pull_request: - branches: [master] - types: [closed] + release: + types: [published] jobs: build: @@ -26,31 +27,35 @@ jobs: name: built-output path: ./dist - release: + generate_changelog: runs-on: ubuntu-latest - if: github.event.pull_request.merged && startsWith(github.head_ref, 'rc') + name: Generate changelog for default branch steps: - uses: actions/checkout@v2 - - name: Tag and prepare release - id: tag_and_prepare_release - uses: K-Phoen/semver-release-action@v1.3.1 with: + ref: master + + - name: Generate changelog + uses: charmixer/auto-changelog-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} release_branch: master - tag_format: "%major%.%minor%.%patch%" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload release notes - if: steps.tag_and_prepare_release.outputs.tag - uses: Roang-zero1/github-create-release-action@v2.1.0 + base: HISTORY.md + since_tag: "0.7.0" + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v2 with: - created_tag: ${{ steps.tag_and_prepare_release.outputs.tag }} - update_existing: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + base: master + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Update changelog + title: Update changelog + body: Update the changelog. This PR is created automatically after a new release. + branch: update-changelog publish: runs-on: ubuntu-latest - needs: [build, release] + needs: [build] steps: - name: Load saved build output uses: actions/download-artifact@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index da020f24..ad44d136 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/HISTORY.md b/HISTORY.md index 0881bfd1..d3a31533 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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) diff --git a/RELEASE.md b/RELEASE.md index b4d94e95..cafa1118 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,14 +1,13 @@ # Release procedure -- Create a release branch from develop, called `rc`. -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. +- Create a release branch from develop. +- Merge `master` branch into the release branch 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. +- Create a pull request from release branch to `master` with the upcoming release number as the title. - Merge the pull request into `master`, do not squash. +- Wait for all GitHub actions to have run successfully. +- Go to GitHub releases page and publish the current draft release, setting the correct title and tag version from master branch. Do not use a `v` prefix for the tag. - Fetch and checkout the `master` branch. - Fetch and checkout the `develop` branch. - Merge `master` into branch `develop`. diff --git a/camacq/VERSION b/camacq/VERSION index f38fc539..0a1ffad4 100644 --- a/camacq/VERSION +++ b/camacq/VERSION @@ -1 +1 @@ -0.7.3 +0.7.4 diff --git a/scripts/gen_changelog.py b/scripts/gen_changelog.py index d8190d2d..c67652b1 100755 --- a/scripts/gen_changelog.py +++ b/scripts/gen_changelog.py @@ -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(): @@ -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",