Skip to content

Commit

Permalink
Update changelog with unreleased changes
Browse files Browse the repository at this point in the history
This is done immediately before updating the `latest` documentation,
meaning the updated CHANGELOG will not be a part of the code base, but
rather only the documentation release.
This is fine as the proper CHANGELOG upon releases will still be
updated.

Closes #11
  • Loading branch information
CasperWA committed Jul 6, 2022
1 parent a3580fd commit d8d32a1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/cd_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
exclude_labels: "${{ inputs.changelog_exclude_labels }}"

- name: Move CHANGELOG.md
run: mv CHANGELOG.md ./main/CHANGELOG.md
run: mv -f CHANGELOG.md ./main/CHANGELOG.md

- name: Set up git user
run: |
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/ci_cd_updated_default_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ on:
required: false
type: boolean
default: false
changelog_exclude_tags_regex:
description: "A regular expression matching any tags that should be excluded from the CHANGELOG.md."
required: false
type: string
default: ""
changelog_exclude_labels:
description: "Comma-separated list of labels to exclude from the CHANGELOG.md."
required: false
type: string
default: ""
secrets:
PAT:
description: "A personal access token (PAT) with rights to update the `permanent_dependencies_branch`. This will fallback on `GITHUB_TOKEN`."
Expand Down Expand Up @@ -233,6 +243,20 @@ jobs:
unprotect_reviews: true
path: main

# Note: This updated changelog will only exist for the `latest` documentation
# release.
- name: Update changelog with unreleased changes
uses: CharMixer/auto-changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
release_branch: ${{ inputs.default_repo_branch }}
exclude_tags_regex: "${{ inputs.changelog_exclude_tags_regex }}"
exclude_labels: "${{ inputs.changelog_exclude_labels }}"
future_release: "Unreleased changes"

- name: Move CHANGELOG.md
run: mv -f CHANGELOG.md ./main/CHANGELOG.md

- name: Deploy documentation
if: env.RELEASE_RUN == 'false' && ( ! inputs.test )
run: mike deploy --push --remote origin --branch gh-pages --update-aliases --config-file mkdocs.yml latest ${{ inputs.default_repo_branch }}
Expand Down

0 comments on commit d8d32a1

Please # to comment.