Compare commits

...

7 Commits
v1.0.0 ... main

4 changed files with 16 additions and 9 deletions

View File

@ -28,7 +28,7 @@ on:
jobs:
build:
if: "contains(github.event.head_commit.message, 'CI') != true"
if: "contains(github.event.head_commit.message, vars.SKIP_CI_PREFIX) != true"
steps:
- uses: action/checkout@<latest_tag>
with:
@ -37,15 +37,16 @@ jobs:
# ... do some CI habitual stuff
- uses: RouxAntoine/auto-changie@<latest_tag>
- uses: https://antoine-roux.tk/projects/actions/auto-changie@<latest_tag>
- name: Push changelog
uses: stefanzweifel/git-auto-commit-action@<latest_tag>
with:
commit_message: "CI: Push updated changelog"
commit_message: "${{ vars.SKIP_CI_PREFIX }} Push updated changelog"
file_pattern: "\\.changes/* CHANGELOG.md .changie.yaml"
```
This pipeline clone code update changelog with auto-changie and push it to main thanks to [git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action).
> Notice the use of `fetch-depth: 0` should be set.
> Indeed without this not all commit are retrieve and auto-changie fail to find all commit updated since previous run.
> Indeed without this not all commit are retrieve and auto-changie fail to find all commit updated since previous run.

View File

@ -1,5 +1,8 @@
name: 'Auto changie'
description: 'Changie action with auto numbering'
branding:
icon: file-plus
color: purple
inputs:
changie-version:
description: 'Changie version'
@ -13,7 +16,7 @@ runs:
using: "composite"
steps:
- name: Setup node
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ inputs.node-version }}

3
renovate.json Normal file
View File

@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}

View File

@ -16,11 +16,11 @@ if [ -z "$noRelease" ];
then
lastVersion=$(changie latest)
lastSeenCommit=$(cat .changes/$lastVersion.md | grep --only-matching --max-count 1 -E '\b[0-9a-f]{5,40}\b')
else
lastSeenCommit=$(git rev-list --max-parents=0 HEAD --abbrev-commit)
fi
commit=$(git log --oneline --pretty=format:'%h - %s' --abbrev-commit $lastSeenCommit..HEAD)
commit=$(git log --no-merges --oneline --pretty=format:'%h - %s' --abbrev-commit $lastSeenCommit..HEAD)
else
commit=$(git log --no-merges --oneline --pretty=format:'%h - %s' --abbrev-commit)
fi
# deal with case of no new commit
if [ -n "$commit" ]; then