Skip to content

Commit

Permalink
ci: fix release process
Browse files Browse the repository at this point in the history
  • Loading branch information
tombh committed Oct 6, 2023
1 parent 6c5e295 commit 0e963a0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
ssh-key: ${{secrets.CI_RELEASE_DEPLOY_KEY}}
fetch-depth: 0
- name: Use Python "3.10"
uses: actions/setup-python@v4
Expand All @@ -23,19 +24,27 @@ jobs:
uses: orhun/git-cliff-action@v2
id: git-cliff
with:
config: cliff.toml
args: --verbose --latest
env:
OUTPUT: git-cliff-changes.tmp.md
- name: Update the changelog
run: |
echo "${{ steps.git-cliff.outputs.contents }}" | sed -i "3r /dev/stdin" CHANGELOG.md
git checkout main
cat git-cliff-changes.tmp.md | sed -i "3r /dev/stdin" CHANGELOG.md
git config --global user.name 'Github Action'
git config --global user.email '[email protected]'
git commit -am "chore: update changelog"
git add CHANGELOG.md
git commit -m "chore: update CHANGELOG.md"
git push
- name: Update CONTRIBUTORS.md
run: |
git checkout main
poetry install
poetry run poe generate_contributors_md
if [[ $(git diff --stat CONTRIBUTORS.md) != '' ]]; then
git commit -am "chore: update CONTRIBUTORS.md"
git add CONTRIBUTORS.md
git commit -m "chore: update CONTRIBUTORS.md"
git push
fi
- name: Release
Expand Down
2 changes: 1 addition & 1 deletion cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body = """
{% else %}\
## [unreleased]
{% endif %}\
More details: https://github.com/openlawlibrary/pygls/releases/tag/v{{version}}
More details: https://github.com/openlawlibrary/pygls/releases/tag/{{version}}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
Expand Down

0 comments on commit 0e963a0

Please sign in to comment.