Skip to content

Commit 6b042d8

Browse files
committed
feat: Add pre-merge generated updates (#42)
Adding MSRV and changelog. With some conventional commit linting on PRs
1 parent af2c1a3 commit 6b042d8

File tree

4 files changed

+358
-133
lines changed

4 files changed

+358
-133
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -28,54 +28,55 @@ jobs:
2828
- name: Build
2929
subcommand: build --release --all-features --verbose
3030
steps:
31-
- uses: actions/checkout@v2
32-
- name: Stable with rustfmt and clippy
33-
uses: actions-rs/toolchain@v1
34-
with:
35-
profile: minimal
36-
toolchain: stable
37-
components: rustfmt, clippy
38-
- uses: Swatinem/rust-cache@v1
39-
- name: cargo check - ${{ matrix.cargo_checks.name }}
40-
run: cargo ${{ matrix.cargo_checks.subcommand }}
41-
generate_changelog:
42-
name: Generate changelog
43-
runs-on: ubuntu-latest
44-
steps:
45-
- name: Checkout
46-
uses: actions/checkout@v2
47-
with:
48-
fetch-depth: 0
49-
- name: Install Rust
31+
- uses: actions/checkout@v2
32+
- name: Stable with rustfmt and clippy
5033
uses: actions-rs/toolchain@v1
5134
with:
52-
toolchain: stable
5335
profile: minimal
54-
override: true
36+
toolchain: stable
37+
components: rustfmt, clippy
5538
- uses: Swatinem/rust-cache@v1
56-
with:
57-
key: changelog
58-
- name: Generate a changelog
59-
uses: orhun/git-cliff-action@v1
60-
id: git-cliff
61-
with:
62-
config: cliff.toml
63-
args: --verbose
64-
env:
65-
OUTPUT: CHANGELOG-generated.md
66-
- name: Print the changelog
67-
run: cat "${{ steps.git-cliff.outputs.changelog }}"
68-
- name: Upload generated CHANGELOG
69-
uses: actions/upload-artifact@v2
70-
with:
71-
name: CHANGELOG-generated
72-
path: CHANGELOG-generated.md
73-
retention-days: 1
39+
- name: cargo check - ${{ matrix.cargo_checks.name }}
40+
run: cargo ${{ matrix.cargo_checks.subcommand }}
41+
#generate_changelog:
42+
# name: Generate changelog
43+
# runs-on: ubuntu-latest
44+
# steps:
45+
# - name: Checkout
46+
# uses: actions/checkout@v2
47+
# with:
48+
# fetch-depth: 0
49+
# - name: Install Rust
50+
# uses: actions-rs/toolchain@v1
51+
# with:
52+
# toolchain: stable
53+
# profile: minimal
54+
# override: true
55+
# - uses: Swatinem/rust-cache@v1
56+
# with:
57+
# key: changelog
58+
# - name: Generate a changelog
59+
# uses: orhun/git-cliff-action@v1
60+
# id: git-cliff
61+
# with:
62+
# config: cliff.toml
63+
# args: --verbose
64+
# env:
65+
# OUTPUT: CHANGELOG-generated.md
66+
# - name: Print the changelog
67+
# run: cat "${{ steps.git-cliff.outputs.changelog }}"
68+
# - name: Upload generated CHANGELOG
69+
# uses: actions/upload-artifact@v2
70+
# with:
71+
# name: CHANGELOG-generated
72+
# path: CHANGELOG-generated.md
73+
# retention-days: 1
74+
7475
#commit_changelog:
75-
# name: Commit changelog
76+
# name: Commit changelog
7677
# #if: github.event_name == 'push' && github.ref == 'refs/heads/staging'
7778
# needs:
78-
# - ci
79+
# - ci
7980
# - generate_changelog
8081
# runs-on: ubuntu-latest
8182
# steps:
@@ -99,16 +100,21 @@ jobs:
99100
# with:
100101
# add: CHANGELOG.md
101102
# new_branch: ${{ env.GIT_BRANCH_NAME }}
102-
# #new_branch: staging
103+
# #new_branch: staging
103104
# default_author: github_actions
104105
# message: "[skip ci] Update CHANGELOG from Github Actions"
106+
107+
update_project_stuff:
108+
uses: ./.github/workflows/update-repo-stuff.yml
109+
secrets: inherit
110+
105111
done:
106112
name: Done
107113
if: github.event_name == 'push' && github.ref == 'refs/heads/staging'
108-
needs:
114+
needs:
109115
- ci
110116
#- commit_changelog
111117
runs-on: ubuntu-latest
112118
steps:
113119
- name: Done
114-
run: echo "Done!"
120+
run: echo "Done!"

.github/workflows/lint_pr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Lint PR"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
name: Validate PR title
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/action-semantic-pull-request@v4
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
with:
19+
ignoreLabels: |
20+
bot
21+
ignore-semantic-pull-request

.github/workflows/post-pr.yml

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)