@kitschpatrol/repo-config 4.4.3 → 4.5.0

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.
@@ -16,7 +16,7 @@ jobs:
16
16
 
17
17
  steps:
18
18
  - name: Checkout
19
- uses: actions/checkout@v3
19
+ uses: actions/checkout@v4
20
20
  with:
21
21
  fetch-depth: 0
22
22
 
@@ -50,7 +50,7 @@ jobs:
50
50
  - name: Release Notes
51
51
  if: env.IS_VALID_COMMIT == 'true'
52
52
  id: release-notes
53
- uses: Bullrich/generate-release-changelog@master
53
+ uses: Bullrich/generate-release-changelog@6b60f004b4bf12ff271603dc32dbd261965ad2f2
54
54
 
55
55
  - name: Release
56
56
  if: env.IS_VALID_COMMIT == 'true'
@@ -0,0 +1,46 @@
1
+ name: Overwrite GitHub repo metadata with info from package.json
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ jobs:
6
+ build:
7
+ name: Sync Metadata
8
+ runs-on: ubuntu-latest
9
+ env:
10
+ IS_VALID_TOKEN: false
11
+ HAS_PACKAGE: false
12
+
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - name: Check for package.json
20
+ run: |
21
+ if [ -f package.json ]; then
22
+ echo "📦 Found package.json"
23
+ echo "HAS_PACKAGE=true" >> $GITHUB_ENV
24
+ else
25
+ echo "❌ This action requires a package.json to run"
26
+ echo "HAS_PACKAGE=false" >> $GITHUB_ENV
27
+ fi
28
+
29
+ - name: Validate Access Token
30
+ if: env.HAS_PACKAGE == 'true'
31
+ run: |
32
+ if [ -z ${{ secrets.PERSONAL_ACCESS_TOKEN }} ]; then
33
+ echo "❌ This action requires a Personal Access token to run"
34
+ echo "IS_VALID_TOKEN=false" >> $GITHUB_ENV
35
+ else
36
+ echo "🔑 Authenticated with Personal Access token"
37
+ echo "IS_VALID_TOKEN=true" >> $GITHUB_ENV
38
+ fi
39
+
40
+ - name: Sync Package info to GitHub
41
+ if: env.IS_VALID_TOKEN == 'true' && env.HAS_PACKAGE == 'true'
42
+ uses: kbrashears5/github-action-repo-sync@v2.0.0
43
+ with:
44
+ TYPE: npm
45
+ PATH: package.json
46
+ TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@kitschpatrol/repo-config",
3
- "version": "4.4.3",
3
+ "version": "4.5.0",
4
4
  "type": "module",
5
- "description": "Initial repo configuration for @kitschpatrol/shared-config",
5
+ "description": "Repository configuration and GitHub workflows for @kitschpatrol/shared-config.",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git@github.com:kitschpatrol/shared-config.git",
@@ -29,6 +29,11 @@
29
29
  "bin/*",
30
30
  "init/*"
31
31
  ],
32
+ "keywords": [
33
+ "shared-config",
34
+ "github-actions",
35
+ "cli"
36
+ ],
32
37
  "dependencies": {
33
38
  "@pinojs/json-colorizer": "^4.0.0",
34
39
  "cosmiconfig": "^9.0.0",
package/readme.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![NPM Package @kitschpatrol/repo-config](https://img.shields.io/npm/v/@kitschpatrol/repo-config.svg)](https://npmjs.com/package/@kitschpatrol/repo-config)
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
9
 
10
- **Initial repo configuration for @kitschpatrol/shared-config**
10
+ **Repository configuration and GitHub workflows for @kitschpatrol/shared-config.**
11
11
 
12
12
  <!-- /header -->
13
13
 
@@ -20,7 +20,9 @@ This includes the following:
20
20
  - [`.npmrc`](https://pnpm.io/npmrc) with hoisting patterns for \`shared-config\`\` tool access
21
21
  - `.gitignore` with typical patterns
22
22
  - `.vscode` extension recommendations (additional settings and recommendations come from other `shared-config` packages)
23
- - `.github` folder with a workflow for turning vX.X.X tags into GitHub releases
23
+ - `.github` folder with workflows:
24
+ - `github-release.yml` Automates turning turning vX.X.X tags on main into GitHub releases
25
+ - `sync-metadata.yml` Populates GitHub repo metadata from package.json
24
26
 
25
27
  It's needed to work around some hoisting issues related to plugin resolution in the other `@kitschpatrol/shared-config` packages.
26
28
 
@@ -66,7 +68,14 @@ There are two options for authenticating the release workflow action:
66
68
 
67
69
  If you want releases to come from your account instead of `github_actions`, then:
68
70
 
69
- 1. Create a [fine-grained personal access token](https://github.com/settings/tokens?type=beta) in your GitHub account with the "Contents" repository permission set to "Read and Write".
71
+ 1. Create a [fine-grained personal access token](https://github.com/settings/tokens?type=beta) in your GitHub account with the following permissions:
72
+
73
+ | Permission | Access |
74
+ | -------------- | -------------- |
75
+ | Administration | Read and write |
76
+ | Contents | Read and write |
77
+ | Metadata | Read-only |
78
+
70
79
  2. Add the token as a secret to the repository under the key `PERSONAL_ACCESS_TOKEN`.
71
80
 
72
81
  ## Usage
@@ -77,7 +86,7 @@ If you want releases to come from your account instead of `github_actions`, then
77
86
 
78
87
  #### Command: `repo-config`
79
88
 
80
- Initial repo configuration for @kitschpatrol/shared-config
89
+ Repository configuration and GitHub workflows for @kitschpatrol/shared-config.
81
90
 
82
91
  Usage:
83
92