Skip to content

Commit 087cb46

Browse files
chore: sync files with beam-community/common-config (#149)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 3370a8d commit 087cb46

9 files changed

Lines changed: 108 additions & 31 deletions

File tree

.commitlintrc.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This file is synced with beam-community/common-config. Any changes will be overwritten.
2+
3+
extends:
4+
- "@commitlint/config-conventional"
5+
6+
rules:
7+
type-enum:
8+
- 2
9+
- always
10+
- - feat
11+
- fix
12+
- docs
13+
- style
14+
- refactor
15+
- perf
16+
- test
17+
- build
18+
- ci
19+
- chore
20+
- revert
21+
subject-case:
22+
- 0
23+
header-max-length:
24+
- 2
25+
- always
26+
- 100

.github/common-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore-files:
2+
- .github/common-config.yaml # Ignore this file itself

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ updates:
66
interval: weekly
77
commit-message:
88
prefix: "chore(deps)"
9+
cooldown:
10+
default-days: 7
911

1012
- package-ecosystem: mix
1113
directory: "/"
@@ -18,3 +20,5 @@ updates:
1820
dependency-type: production
1921
dev:
2022
dependency-type: development
23+
cooldown:
24+
default-days: 7

.github/workflows/ci.yaml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ jobs:
3131
uses: actions/checkout@v6
3232

3333
- name: Setup Elixir
34-
uses: stordco/actions-elixir/setup@v1
34+
uses: erlef/setup-beam@v1
3535
with:
3636
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
37+
elixir-version: "1.19"
38+
otp-version: "27.0"
39+
40+
- run: mix deps.get
3741

3842
- name: Credo
3943
run: mix credo --strict
@@ -46,9 +50,13 @@ jobs:
4650
uses: actions/checkout@v6
4751

4852
- name: Setup Elixir
49-
uses: stordco/actions-elixir/setup@v1
53+
uses: erlef/setup-beam@v1
5054
with:
5155
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
56+
elixir-version: "1.19"
57+
otp-version: "27.0"
58+
59+
- run: mix deps.get
5260

5361
- name: Unused
5462
run: mix deps.unlock --check-unused
@@ -61,9 +69,13 @@ jobs:
6169
uses: actions/checkout@v6
6270

6371
- name: Setup Elixir
64-
uses: stordco/actions-elixir/setup@v1
72+
uses: erlef/setup-beam@v1
6573
with:
6674
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
75+
elixir-version: "1.19"
76+
otp-version: "27.0"
77+
78+
- run: mix deps.get
6779

6880
- name: Dialyzer
6981
run: mix dialyzer --format github
@@ -76,9 +88,13 @@ jobs:
7688
uses: actions/checkout@v6
7789

7890
- name: Setup Elixir
79-
uses: stordco/actions-elixir/setup@v1
91+
uses: erlef/setup-beam@v1
8092
with:
8193
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
94+
elixir-version: "1.19"
95+
otp-version: "27.0"
96+
97+
- run: mix deps.get
8298

8399
- name: Format
84100
run: mix format --check-formatted
@@ -96,12 +112,14 @@ jobs:
96112
uses: actions/checkout@v6
97113

98114
- name: Setup Elixir
99-
uses: stordco/actions-elixir/setup@v1
115+
uses: erlef/setup-beam@v1
100116
with:
101117
elixir-version: ${{ matrix.versions.elixir }}
102118
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
103119
otp-version: ${{ matrix.versions.otp }}
104120

121+
- run: mix deps.get
122+
105123
- name: Compile
106124
run: mix compile --warnings-as-errors
107125

.github/workflows/dependabot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222
- name: Fetch Metadata
2323
id: metadata
24-
uses: dependabot/fetch-metadata@v2
24+
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3
2525
with:
2626
github-token: ${{ secrets.GITHUB_TOKEN }}
2727

.github/workflows/pr.yaml

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,35 +12,54 @@ on:
1212
- synchronize
1313

1414
jobs:
15-
Title:
15+
Commits:
16+
name: Conventional Commits
17+
runs-on: ubuntu-latest
18+
if: ${{ github.event_name == 'pull_request' }}
19+
1620
permissions:
21+
contents: read
1722
pull-requests: read
1823

19-
if: ${{ github.event_name == 'pull_request' }}
20-
name: Check Title
21-
runs-on: ubuntu-latest
22-
2324
steps:
24-
- name: Check
25-
uses: stordco/actions-pr-title@v1.0.0
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2626
with:
27-
regex: '^(refactor!|feat!|fix!|refactor|fix|feat|chore)(\(\w+\))?:\s(\[#\d{1,5}\])?.*$'
28-
hint: |
29-
Your PR title does not match the Conventional Commits convention. Please rename your PR to match one of the following formats:
27+
fetch-depth: 0
3028

31-
fix: [#123] some title of the PR
32-
fix(scope): [#123] some title of the PR
33-
feat: [#1234] some title of the PR
34-
chore: update some action
29+
- uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6
30+
with:
31+
configFile: .commitlintrc.yml
3532

36-
Note: Adding ! (i.e. `feat!:`) represents a breaking change and will result in a SemVer major release.
33+
Labels:
34+
name: Assign Labels
35+
runs-on: ubuntu-latest
36+
if: ${{ github.event_name == 'pull_request' }}
3737

38-
Please use one of the following types:
38+
permissions:
39+
contents: read
40+
pull-requests: write
3941

40-
- **feat:** A new feature, resulting in a MINOR version bump.
41-
- **fix:** A bug fix, resulting in a PATCH version bump.
42-
- **refactor:** A code change that neither fixes a bug nor adds a feature.
43-
- **chore:** Changes unrelated to the release code, resulting in no version bump.
44-
- **revert:** Reverts a previous commit.
42+
steps:
43+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
4544

46-
See https://www.conventionalcommits.org/en/v1.0.0/ for more information.
45+
- uses: mauroalderete/action-assign-labels@671a4ca2da0f900464c58b8b5540a1e07133e915 # v1
46+
with:
47+
pull-request-number: ${{ github.event.pull_request.number }}
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
conventional-commits: |
50+
conventional-commits:
51+
- type: 'fix'
52+
nouns: ['FIX', 'Fix', 'fix']
53+
labels: ['bug']
54+
- type: 'feature'
55+
nouns: ['FEAT', 'Feat', 'feat']
56+
labels: ['feature']
57+
- type: 'chore'
58+
nouns: ['CHORE', 'Chore', 'chore']
59+
labels: ['chore']
60+
- type: 'docs'
61+
nouns: ['DOCS', 'Docs', 'docs']
62+
labels: ['documentation']
63+
- type: 'ci'
64+
nouns: ['CI', 'Ci', 'ci']
65+
labels: ['ci']

.github/workflows/production.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ jobs:
2121
uses: actions/checkout@v6
2222

2323
- name: Setup Elixir
24-
uses: stordco/actions-elixir/setup@v1
24+
uses: erlef/setup-beam@v1
2525
with:
2626
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
27+
elixir-version: "1.19"
28+
otp-version: "27.0"
29+
30+
- run: mix deps.get
2731

2832
- name: Compile
2933
run: mix compile --docs

.github/workflows/publish-docs.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ jobs:
1818
uses: actions/checkout@v6
1919

2020
- name: Setup Elixir
21-
uses: stordco/actions-elixir/setup@v1
21+
uses: erlef/setup-beam@v1
2222
with:
2323
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
24+
elixir-version: "1.19"
25+
otp-version: "27.0"
26+
27+
- run: mix deps.get
2428

2529
- name: Publish Docs
2630
run: mix hex.publish docs --yes

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- id: release
1616
name: Release
17-
uses: googleapis/release-please-action@v4
17+
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5
1818
with:
1919
config-file: .github/release-please-config.json
2020
manifest-file: .github/release-please-manifest.json

0 commit comments

Comments
 (0)