-
Notifications
You must be signed in to change notification settings - Fork 1
Fix/add action sha #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fcd667c
fix: add full commit SHA to workflows to follow new guidance (deploy-…
pikes-ons 3142c78
feat: add GitHub action to automatically update CHANGELOG.md
pikes-ons 7e8693a
tweak: adjust workflow_dispatch options in changelog action
pikes-ons a07dbd4
tweak: adjust now workflow_dispatch does not contain variables
pikes-ons 979b4a1
Apply suggestions from code review
pikes-ons File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Changelog Update | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*.*.*' | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag_name: | ||
| description: 'Tag name to simulate a push event (e.g. v1.2.3).' | ||
| required: true | ||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| change_log: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Branch | ||
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 | ||
| with: | ||
| fetch-depth: 0 | ||
| token: ${{ secrets.ACCESS_TOKEN }} | ||
| - name: Generate changelog | ||
| uses: orhun/git-cliff-action@f50e11560dce63f7c33227798f90b924471a88b5 | ||
| with: | ||
| config: cliff.toml | ||
| args: --verbose | ||
| env: | ||
| OUTPUT: CHANGELOG.md | ||
| GITHUB_REPO: ${{ github.repository }} | ||
|
|
||
| - name: Commit and retag | ||
| run: | | ||
| git config user.name 'github-actions[bot]' | ||
| git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
| git add CHANGELOG.md | ||
| if git diff --cached --quiet; then | ||
| echo "No changelog changes, skipping." | ||
| exit 0 | ||
| fi | ||
| TAG_NAME="${INPUT_TAG_NAME:-${GITHUB_REF#refs/tags/}}" | ||
| git commit -m "Update changelog for ${TAG_NAME}" | ||
| git push origin HEAD:main | ||
| git tag -f "${TAG_NAME}" | ||
| git push origin -f "${TAG_NAME}" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| # git-cliff ~ configuration file | ||
| # https://git-cliff.org/docs/configuration | ||
|
|
||
| [changelog] | ||
| # A Tera template to be rendered as the changelog's header. | ||
| # See https://keats.github.io/tera/#getting-started | ||
| header = """ | ||
| # Changelog\n | ||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n | ||
| """ | ||
| # A Tera template to be rendered for each release in the changelog. | ||
| # See https://keats.github.io/tera/#getting-started | ||
| body = """ | ||
| {%- macro remote_url() -%} | ||
| https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} | ||
| {%- endmacro -%} | ||
|
|
||
| {% if version -%} | ||
| ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} | ||
| {% else -%} | ||
| ## [Unreleased] | ||
| {% endif -%} | ||
|
|
||
| {% for group, commits in commits | group_by(attribute="group") %} | ||
| ### {{ group | upper_first }} | ||
| {%- for commit in commits %} | ||
| - {{ commit.message | split(pat="\n") | first | upper_first | trim }}\ | ||
| {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%} | ||
| {% if commit.remote.pr_number %} in \ | ||
| [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \ | ||
| {%- endif -%} | ||
| {% endfor %} | ||
| {% endfor %} | ||
|
|
||
| {%- if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %} | ||
| ### New Contributors | ||
| {%- endif -%} | ||
|
|
||
| {% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %} | ||
| * @{{ contributor.username }} made their first contribution | ||
| {%- if contributor.pr_number %} in \ | ||
| [#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \ | ||
| {%- endif %} | ||
| {%- endfor %}\n | ||
|
|
||
| {%- if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}{% raw %}\n{% endraw -%}{% endif %} | ||
|
|
||
| """ | ||
| # A Tera template to be rendered as the changelog's footer. | ||
| # See https://keats.github.io/tera/#getting-started | ||
| footer = """ | ||
| {%- macro remote_url() -%} | ||
| https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }} | ||
| {%- endmacro -%} | ||
|
|
||
| {% for release in releases -%} | ||
| {% if release.version -%} | ||
| {% if release.previous.version -%} | ||
| [{{ release.version | trim_start_matches(pat="v") }}]: \ | ||
| {{ self::remote_url() }}/compare/{{ release.previous.version }}...{{ release.version }} | ||
| {% endif -%} | ||
| {% else -%} | ||
| [unreleased]: {{ self::remote_url() }}/compare/{{ release.previous.version }}...HEAD | ||
| {% endif -%} | ||
| {% endfor %} | ||
| <!-- generated by git-cliff --> | ||
| """ | ||
| # Remove leading and trailing whitespaces from the changelog's body. | ||
| trim = true | ||
|
|
||
| [git] | ||
| # Parse commits according to the conventional commits specification. | ||
| # See https://www.conventionalcommits.org | ||
| conventional_commits = true | ||
| # Exclude commits that do not match the conventional commits specification. | ||
| filter_unconventional = false | ||
| # An array of regex based parsers to modify commit messages prior to further processing. | ||
| commit_preprocessors = [ | ||
| # Remove issue numbers. | ||
| { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }, | ||
| ] | ||
| # An array of regex based parsers for extracting data from the commit message. | ||
| # Assigns commits to groups. | ||
| # Optionally sets the commit's scope and can decide to exclude commits from further processing. | ||
| commit_parsers = [ | ||
| { message = "^[Aa]dd", group = "Added" }, | ||
| { message = "^[Ss]upport", group = "Added" }, | ||
| { message = "^[Rr]emove", group = "Removed" }, | ||
| { message = "^.*: add", group = "Added" }, | ||
| { message = "^.*: support", group = "Added" }, | ||
| { message = "^.*: remove", group = "Removed" }, | ||
| { message = "^.*: delete", group = "Removed" }, | ||
| { message = "^test", group = "Fixed" }, | ||
| { message = "^fix", group = "Fixed" }, | ||
| { message = "^.*: fix", group = "Fixed" }, | ||
| { message = "^.*", group = "Changed" }, | ||
| ] | ||
| # Exclude commits that are not matched by any commit parser. | ||
| filter_commits = false | ||
| # Order releases topologically instead of chronologically. | ||
| topo_order = false | ||
| # Order of commits in each group/release within the changelog. | ||
| # Allowed values: newest, oldest | ||
| sort_commits = "newest" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.