Skip to content

Commit

Permalink
Merge branch 'refs/heads/add_changelog' into add_item_endpoint
Browse files Browse the repository at this point in the history
# Conflicts:
#	cliff.toml
#	src/db/cr_core_initializer.rs
#	src/db/data_providers/creature_fetcher.rs
#	src/db/data_providers/raw_query_builder.rs
#	src/models/creature/creature_struct.rs
#	src/models/creature_component/filter_struct.rs
#	src/models/creature_filter_enum.rs
#	src/models/encounter_structs.rs
#	src/models/mod.rs
#	src/models/pf_version_enum.rs
#	src/models/routers_validator_structs.rs
#	src/routes/bestiary.rs
#	src/services/encounter_service.rs
  • Loading branch information
RakuJa committed May 30, 2024
2 parents ccf6e56 + 7d05fc5 commit 0c23924
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 20 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/clippy.yml

This file was deleted.

10 changes: 7 additions & 3 deletions .github/workflows/fmt.yml → .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
on: pull_request
on:
pull_request:
types: [opened, synchronize, edited, review_requested, ready_for_review]
name: PR

name: Rustfmt
permissions:
contents: read

jobs:
format:
Expand All @@ -15,4 +19,4 @@ jobs:
- uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
mode: review
mode: review
26 changes: 26 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
branches:
- "*"
name: Push

permissions:
contents: read

jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Clippy
run: cargo clippy --all-targets --all-features
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on:
release:
types:
- published

jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate a changelog
uses: orhun/git-cliff-action@v3
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}

- 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 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: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Browse and filter a list of all creatures.
- Balance encounters based on your party size and level.
- Generate random encounters based on your requirements.
- Support for both remaster and legacy content.
- More to come...

## Requirements
Expand All @@ -28,7 +29,7 @@ Built using:
## Installation guide - Local

1. Install [Rust](https://www.rust-lang.org/tools/install) on your machine.
2. Populate the SQLite database.
2. Populate the SQLite database (public release date TBA).
3. Clone this repository:

```
Expand Down
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 0c23924

Please sign in to comment.