Skip to content

Commit

Permalink
chore: refactor actions
Browse files Browse the repository at this point in the history
  • Loading branch information
RakuJa committed May 30, 2024
1 parent 11a1da2 commit 7d05fc5
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ on:
pull_request:
types: [opened, synchronize, edited, review_requested, ready_for_review]
name: PR
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

permissions:
contents: read

jobs:
format:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
- "*"
name: Push

permissions:
contents: read

jobs:
clippy_check:
runs-on: ubuntu-latest
Expand Down
36 changes: 32 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
on: [release]
on:
release:
types:
- published

jobs:
changelog:
Expand All @@ -19,11 +22,36 @@ jobs:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}

- name: Commit
- name: Create Changelog Branch
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git switch -c update_changelog
git add CHANGELOG.md
git commit --no-verify -m "Update changelog"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git master
git commit --no-verify -m "Update changelog after release"
git push -f https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git update_changelog
- name: Create Changelog Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update changelog after release
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
signoff: false
base: master
branch: update_changelog
delete-branch: true
title: 'Update changelog after release'
body: |
Automatic changelog update using git cliff
- Auto-generated after latest release
:artificial_satellite: :rocket: :newspaper:
labels: |
documentation
assignees: RakuJa
reviewers: RakuJa
draft: false
3 changes: 1 addition & 2 deletions cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ commit_parsers = [
{ message = "^test", group = "Fixed" },
{ message = "^fix", group = "Fixed" },
{ message = "^.*: fix", group = "Fixed" },
{ message = "^.*", group = "Changed" },
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false
Expand All @@ -69,7 +68,7 @@ filter_commits = true
# regex for matching git tags
tag_pattern = "v[0-9].*"
# regex for skipping tags
skip_tags = "v0.1.0-beta.1"
skip_tags = ""
# regex for ignoring tags
ignore_tags = ""
# sort the tags topologically
Expand Down

0 comments on commit 7d05fc5

Please sign in to comment.