Skip to content

Commit 335cfce

Browse files
committed
Merge branch 'master' of github.com:semantic-release/commit-analyzer into esm
2 parents b4f9865 + f160add commit 335cfce

11 files changed

+11316
-9800
lines changed

.github/workflows/release.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
name: Release
2-
on:
2+
"on":
33
push:
44
branches:
55
- master
66
- next
77
- beta
8-
- "*.x" # maintenance releases branches
9-
8+
- "*.x"
9+
permissions:
10+
contents: read # for checkout
1011
jobs:
1112
release:
13+
permissions:
14+
contents: write # to be able to publish a GitHub release
15+
issues: write # to be able to comment on released issues
16+
pull-requests: write # to be able to comment on released pull requests
17+
id-token: write # to enable use of OIDC for npm provenance
1218
name: release
1319
runs-on: ubuntu-latest
1420
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v2
21+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
22+
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
1723
with:
18-
node-version: 16
24+
node-version: lts/*
1925
cache: npm
2026
- run: npm ci
2127
- run: npx semantic-release

.github/workflows/test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
- windows-latest
2222
runs-on: "${{ matrix.os }}"
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
2525
- name: "Use Node.js ${{ matrix.node-version }}"
26-
uses: actions/setup-node@v2
26+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
2727
with:
2828
node-version: "${{ matrix.node-version }}"
2929
cache: npm
@@ -33,8 +33,8 @@ jobs:
3333
runs-on: ubuntu-latest
3434
needs: test_matrix
3535
steps:
36-
- uses: actions/checkout@v2
37-
- uses: actions/setup-node@v2
36+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
37+
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
3838
with:
3939
node-version: 16
4040
cache: npm

lib/analyze-commit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default (releaseRules, commit) => {
2727
isString(src) && isString(object) ? micromatch.isMatch(object, src) : undefined
2828
)
2929
)
30-
.every(match => {
30+
.every((match) => {
3131
if (compareReleaseTypes(releaseType, match.release)) {
3232
releaseType = match.release;
3333
debug('The rule %o match commit with release type %o', match, releaseType);

lib/load-release-rules.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default ({ releaseRules }, { cwd }) => {
3131
throw new TypeError('Error in commit-analyzer configuration: "releaseRules" must be an array of rules');
3232
}
3333

34-
loadedReleaseRules.forEach(rule => {
34+
loadedReleaseRules.forEach((rule) => {
3535
if (!rule || isUndefined(rule.release)) {
3636
throw new Error('Error in commit-analyzer configuration: rules must be an object with a "release" property');
3737
} else if (!RELEASE_TYPES.includes(rule.release) && rule.release !== null && rule.release !== false) {

0 commit comments

Comments
 (0)