Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit d2ea872

Browse files
authored
Merge pull request #304 from PrisisForks/feature/semantic-release
2 parents 5589ac2 + ac60adf commit d2ea872

File tree

7 files changed

+60
-72
lines changed

7 files changed

+60
-72
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This action will automatically close issues fixed in
2+
# pull requests that doesn't target the default branch.
3+
4+
name: Auto Close Fixed Issues
5+
on:
6+
pull_request_target:
7+
types: [closed]
8+
jobs:
9+
run:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: bubkoo/auto-close-fixed-issues@v1
13+
with:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
comment: |
16+
This issue was closed by #{{ pr }}.

.github/workflows/semantic-release.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
extra_plugins: |
2929
@semantic-release/changelog@^5.0.1
3030
@semantic-release/git@^9.0.0
31+
@google/semantic-release-replace-plugin@^1.0.0
3132
conventional-changelog-conventionalcommits@^4.3.0
3233
env:
33-
GITHUB_TOKEN: ${{ secrets.SEMANTIC_GITHUB_TOKEN }}
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc.json

+35-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@
2121
"preset": "conventionalcommits"
2222
}
2323
],
24+
[
25+
"@google/semantic-release-replace-plugin",
26+
{
27+
"replacements": [
28+
{
29+
"files": [
30+
"composer.json"
31+
],
32+
"from": "\"dev-master\": \".*\"",
33+
"to": "\"dev-master\": \"${nextRelease.version.replace(/\\.\\w+$/, '-dev')}\"",
34+
"results": [
35+
{
36+
"file": "composer.json",
37+
"hasChanged": true,
38+
"numMatches": 1,
39+
"numReplacements": 1
40+
}
41+
],
42+
"countMatches": true
43+
}
44+
]
45+
}
46+
],
2447
[
2548
"@semantic-release/release-notes-generator",
2649
{
@@ -29,6 +52,17 @@
2952
],
3053
"@semantic-release/changelog",
3154
"@semantic-release/github",
32-
"@semantic-release/git"
55+
[
56+
"@semantic-release/git",
57+
{
58+
"assets": [
59+
"composer.json",
60+
"src/*",
61+
"UPGRADE.md",
62+
"LICENSE.md",
63+
"CHANGELOG.md"
64+
]
65+
}
66+
]
3367
]
3468
}

composer.json

+5
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
"preferred-install": "dist",
4747
"sort-packages": true
4848
},
49+
"extra": {
50+
"branch-alias": {
51+
"dev-master": "1.0-dev"
52+
}
53+
},
4954
"autoload": {
5055
"psr-4": {
5156
"Narrowspark\\CS\\Config\\": "src"

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
},
1010
"scripts": {
1111
"lint": "textlint ./.build/ISSUE_TEMPLATE/** ./src/** ./docs/** ./README.md --dry-run",
12-
"lint:fix": "textlint ./.build/ISSUE_TEMPLATE/** ./src/** ./docs/** ./README.md --fix"
12+
"lint:fix": "textlint ./.build/ISSUE_TEMPLATE/** ./src/** ./docs/** ./README.md --fix",
13+
"prepublishOnly": "if [ \"$CI\" = '' ]; then node -p 'JSON.parse(process.env.npm_package_config_manualPublishMessage)'; exit 1; fi"
1314
}
1415
}

src/Config.php

-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@
6868

6969
final class Config extends CsConfig
7070
{
71-
public const VERSION = '';
72-
7371
/** @var array<string, array<string, string>> */
7472
private array $headerRules = [];
7573

tests/AutoReview/ComposerTest.php

-67
This file was deleted.

0 commit comments

Comments
 (0)