@kununu/stylelint-config 4.5.8 → 4.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  name: Auto assign owner when opening PRs
2
2
  on:
3
- pull_request:
4
- types: [ opened ]
3
+ pull_request:
4
+ types: [ opened ]
5
5
  jobs:
6
- auto-assign-owner:
7
- if: startsWith(github.event.ref, 'dependabot/') == false
8
- runs-on: ubuntu-latest
9
- steps:
10
- - name: Auto assign owner
11
- uses: danielswensson/auto-assign-owner-action@v1.0.2
12
- with:
13
- github-token: ${{ secrets.GITHUB_TOKEN }}
6
+ auto-assign-owner:
7
+ if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: Auto assign owner
11
+ uses: danielswensson/auto-assign-owner-action@v1.0.2
12
+ with:
13
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -4,74 +4,157 @@ on:
4
4
  workflow_dispatch:
5
5
  inputs:
6
6
  version:
7
- description: 'Semver version (major / minor / patch)'
7
+ description: "Semver version (major / minor / patch)"
8
8
 
9
9
  required: true
10
10
  type: choice
11
- options:
12
- - patch
13
- - minor
14
- - major
11
+ options:
12
+ - patch
13
+ - minor
14
+ - major
15
15
 
16
16
  env:
17
17
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18
18
 
19
- permissions:
20
- id-token: write # Required for OIDC
21
- contents: write
22
-
23
19
  jobs:
24
20
  release:
25
21
  runs-on: ubuntu-latest
26
22
 
23
+ permissions:
24
+ id-token: write # Required for OIDC
25
+ contents: write
26
+ pull-requests: write
27
+
27
28
  steps:
28
- - name: Generate GitHub App Token
29
- id: generate_token
30
- env:
31
- GITHUB_APP_ID: ${{ secrets.GH_APPS_APP_ID }}
32
- GITHUB_INST_ID: ${{ secrets.GH_APPS_INSTALLATION_ID }}
33
- GITHUB_KEY_VALUE: ${{ secrets.GH_APPS_PRIVATE_KEY }}
34
- run: |
35
- GO_GITHUB_VERSION="1.0.1"
36
- wget -O ghapps https://github.com/kununu/go-github/releases/download/v${GO_GITHUB_VERSION}/go-github_${GO_GITHUB_VERSION}_linux_amd64 && chmod +x ghapps
37
-
38
- echo "GH_APPS_TOKEN=$(./ghapps)" >> $GITHUB_ENV
39
-
40
- - name: Checkout Source
41
- uses: actions/checkout@v3
42
- with:
43
- fetch-depth: 0
44
- token: ${{ env.GH_APPS_TOKEN }}
45
-
46
- - name: Setup Node
47
- uses: actions/setup-node@v3
48
- with:
49
- node-version: '20'
50
- cache: 'npm'
51
-
52
- # Ensure npm 11.5.1 or later is installed
53
- - name: Update npm
54
- run: npm install -g npm@latest
55
-
56
- - name: Setup git
57
- run: |
58
- git config user.name "github-actions"
59
- git config user.email "technik@kununu.com"
60
-
61
- - name: Install Packages
62
- run: npm ci
63
-
64
- - name: Bump Package Version
65
- run: |
66
- npm version ${{ github.event.inputs.version }}
67
-
68
- - name: Publish
69
- run: |
70
- npm publish
71
-
72
- - name: Create Github Release
73
- run: |
74
- gh release create $(sed -nr 's/^\s*\"version": "([0-9]{1,}\.[0-9]{1,}.*)",$/\1/p' package.json) --generate-notes
75
-
76
- - name: Push Version Changes
77
- run: git push origin ${GITHUB_REF##*/} --follow-tags
29
+ - name: Generate GitHub App Token
30
+ id: generate_token
31
+ env:
32
+ GITHUB_APP_ID: ${{ secrets.GH_APPS_APP_ID }}
33
+ GITHUB_INST_ID: ${{ secrets.GH_APPS_INSTALLATION_ID }}
34
+ GITHUB_KEY_VALUE: ${{ secrets.GH_APPS_PRIVATE_KEY }}
35
+ run: |
36
+ GO_GITHUB_VERSION="1.0.1"
37
+ wget -O ghapps https://github.com/kununu/go-github/releases/download/v${GO_GITHUB_VERSION}/go-github_${GO_GITHUB_VERSION}_linux_amd64 && chmod +x ghapps
38
+
39
+ echo "GH_APPS_TOKEN=$(./ghapps)" >> $GITHUB_ENV
40
+ echo "GH_TOKEN=$(./ghapps)" >> $GITHUB_ENV
41
+
42
+ - name: Checkout Source
43
+ uses: actions/checkout@v6
44
+ with:
45
+ fetch-depth: 0
46
+ token: ${{ env.GH_APPS_TOKEN }}
47
+
48
+ - name: Setup Node
49
+ uses: actions/setup-node@v6
50
+ with:
51
+ node-version: 20
52
+ cache: "npm"
53
+
54
+ # Ensure npm 11.5.1 or later is installed
55
+ - name: Update npm
56
+ run: npm install -g npm@latest
57
+
58
+ - name: Setup git
59
+ run: |
60
+ git config user.name "github-actions[bot]"
61
+ git config user.email "technik@kununu.com"
62
+
63
+ - name: Install Packages
64
+ run: npm ci
65
+
66
+ # avoid npm version to auto-commit, so we can update the version in the changelog in the same commit
67
+ - name: Bump Package Version
68
+ run: |
69
+ npm version ${{ github.event.inputs.version }} --git-tag-version false
70
+
71
+ - name: Read NPM package version from package.json
72
+ run: |
73
+ echo "PACKAGE_VERSION=$(sed -n 's/.*\"version\": \"\([^\"]*\)\".*/\1/p' package.json)" >> "$GITHUB_ENV"
74
+
75
+ - name: Create Release Branch
76
+ run: |
77
+ BRANCH_NAME="release/$PACKAGE_VERSION"
78
+ git checkout -b $BRANCH_NAME
79
+ echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
80
+
81
+ - name: Commit Version Changes
82
+ run: |
83
+ git add package.json
84
+ git add package-lock.json
85
+ git commit -m "chore: release $PACKAGE_VERSION"
86
+ git push origin $BRANCH_NAME
87
+
88
+ - name: Create Pull Request
89
+ run: |
90
+ gh pr create \
91
+ --title "chore: release $PACKAGE_VERSION" \
92
+ --body "Automated release PR for version $PACKAGE_VERSION" \
93
+ --base master \
94
+ --head $BRANCH_NAME
95
+ PR_NUMBER=$(gh pr view $BRANCH_NAME --json number --jq '.number')
96
+ echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
97
+
98
+ - name: Wait for passed checks
99
+ run: |
100
+ TIMEOUT=300 # 5 minutes
101
+ INTERVAL=10 # 10 seconds
102
+ ELAPSED=0
103
+ sleep $INTERVAL # Initial wait before first check
104
+ while [[ $ELAPSED -lt $TIMEOUT ]]; do
105
+ echo "Waiting for status checks... ($ELAPSED of $TIMEOUT seconds)"
106
+ CHECKS_STATUS=$(gh pr checks "$PR_NUMBER" --json state --jq '.[].state')
107
+ ALL_PASSED=true
108
+ ALL_EXECUTED=true
109
+
110
+ for state in $CHECKS_STATUS; do
111
+ if [[ "$state" == "PENDING" || "$state" == "QUEUED" || "$state" == "IN_PROGRESS" ]]; then
112
+ ALL_EXECUTED=false
113
+ ALL_PASSED=false
114
+ break
115
+ fi
116
+ if [[ "$state" != "SUCCESS" && "$state" != "COMPLETED" && "$state" != "SKIPPED" ]]; then
117
+ ALL_PASSED=false
118
+ fi
119
+ done
120
+
121
+ if $ALL_EXECUTED && $ALL_PASSED; then
122
+ echo "All checks passed for PR #$PR_NUMBER."
123
+ exit 0
124
+ fi
125
+
126
+ if $ALL_EXECUTED; then
127
+ if $ALL_PASSED; then
128
+ echo "All checks passed for PR #$PR_NUMBER."
129
+ exit 0
130
+ else
131
+ echo "All checks executed but some failed for PR #$PR_NUMBER."
132
+ exit 1
133
+ fi
134
+ fi
135
+
136
+ sleep $INTERVAL
137
+ ELAPSED=$((ELAPSED + INTERVAL))
138
+ done
139
+ echo "Timeout: Checks did not pass within $TIMEOUT seconds for PR #$PR_NUMBER."
140
+ exit 1
141
+
142
+ - name: Merge PR
143
+ run: |
144
+ gh pr merge $PR_NUMBER --squash --delete-branch --admin
145
+ - name: Checkout Master and Tag
146
+ run: |
147
+ git fetch origin
148
+ git checkout master
149
+ git pull origin master
150
+ git tag $PACKAGE_VERSION
151
+ git push origin --tags
152
+
153
+ # leave npm publish to the end, so we avoid publishing a version that did not finish the entire flow
154
+ - name: Publish
155
+ run: |
156
+ npm publish
157
+
158
+ - name: Create Github Release
159
+ run: |
160
+ gh release create $PACKAGE_VERSION --generate-notes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kununu/stylelint-config",
3
- "version": "4.5.8",
3
+ "version": "4.5.10",
4
4
  "description": "kununu's stylelint config",
5
5
  "author": "kununu",
6
6
  "license": "ISC",
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "prettier": "3.6.2",
29
29
  "stylelint": "16.25.0",
30
- "stylelint-config-standard-scss": "15.0.1",
31
- "stylelint-order": "6.0.4",
30
+ "stylelint-config-standard-scss": "16.0.0",
31
+ "stylelint-order": "7.0.0",
32
32
  "stylelint-prettier": "5.0.3",
33
33
  "stylelint-scss": "6.12.1",
34
34
  "stylelint-semantic-groups": "1.2.1"