readme-aura 0.1.0 → 0.1.2
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.
- package/README.md +1 -1
- package/action.yml +104 -0
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
Write custom **React/JSX components** directly inside your Markdown, and readme-aura will render them into beautiful SVGs that work on GitHub.
|
|
4
4
|
|
package/action.yml
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
name: 'README Aura'
|
|
2
|
+
description: 'Next-Gen README generator — render React/JSX components to beautiful SVG inside Markdown'
|
|
3
|
+
author: 'readme-aura'
|
|
4
|
+
|
|
5
|
+
branding:
|
|
6
|
+
icon: 'feather'
|
|
7
|
+
color: 'purple'
|
|
8
|
+
|
|
9
|
+
inputs:
|
|
10
|
+
source:
|
|
11
|
+
description: 'Path to the source markdown file'
|
|
12
|
+
required: false
|
|
13
|
+
default: 'readme.source.md'
|
|
14
|
+
output:
|
|
15
|
+
description: 'Path to the generated README file'
|
|
16
|
+
required: false
|
|
17
|
+
default: 'README.md'
|
|
18
|
+
assets_dir:
|
|
19
|
+
description: 'Directory to store generated SVG/image assets'
|
|
20
|
+
required: false
|
|
21
|
+
default: '.github/assets'
|
|
22
|
+
github_token:
|
|
23
|
+
description: 'GitHub token for fetching user/repo stats (defaults to GITHUB_TOKEN)'
|
|
24
|
+
required: false
|
|
25
|
+
default: ${{ github.token }}
|
|
26
|
+
github_user:
|
|
27
|
+
description: 'GitHub username (auto-detected from repo owner if omitted)'
|
|
28
|
+
required: false
|
|
29
|
+
default: ''
|
|
30
|
+
fonts_dir:
|
|
31
|
+
description: 'Path to directory with custom font files (.ttf/.otf/.woff)'
|
|
32
|
+
required: false
|
|
33
|
+
default: ''
|
|
34
|
+
commit_message:
|
|
35
|
+
description: 'Commit message for the auto-commit'
|
|
36
|
+
required: false
|
|
37
|
+
default: 'chore: regenerate README via readme-aura'
|
|
38
|
+
auto_commit:
|
|
39
|
+
description: 'Whether to auto-commit and push generated files'
|
|
40
|
+
required: false
|
|
41
|
+
default: 'true'
|
|
42
|
+
|
|
43
|
+
outputs:
|
|
44
|
+
changed:
|
|
45
|
+
description: 'Whether the README was changed (true/false)'
|
|
46
|
+
value: ${{ steps.commit.outputs.changed }}
|
|
47
|
+
|
|
48
|
+
runs:
|
|
49
|
+
using: 'composite'
|
|
50
|
+
steps:
|
|
51
|
+
- name: Setup Node.js
|
|
52
|
+
uses: actions/setup-node@v4
|
|
53
|
+
with:
|
|
54
|
+
node-version: '20'
|
|
55
|
+
|
|
56
|
+
- name: Install readme-aura
|
|
57
|
+
shell: bash
|
|
58
|
+
run: |
|
|
59
|
+
cd ${{ github.action_path }}
|
|
60
|
+
npm ci --ignore-scripts
|
|
61
|
+
npm run build
|
|
62
|
+
|
|
63
|
+
- name: Detect GitHub user
|
|
64
|
+
id: detect-user
|
|
65
|
+
shell: bash
|
|
66
|
+
run: |
|
|
67
|
+
if [ -n "${{ inputs.github_user }}" ]; then
|
|
68
|
+
echo "user=${{ inputs.github_user }}" >> "$GITHUB_OUTPUT"
|
|
69
|
+
else
|
|
70
|
+
echo "user=${{ github.repository_owner }}" >> "$GITHUB_OUTPUT"
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
- name: Run readme-aura build
|
|
74
|
+
shell: bash
|
|
75
|
+
env:
|
|
76
|
+
GITHUB_TOKEN: ${{ inputs.github_token }}
|
|
77
|
+
run: |
|
|
78
|
+
node ${{ github.action_path }}/dist/cli.js build \
|
|
79
|
+
--source "${{ inputs.source }}" \
|
|
80
|
+
--output "${{ inputs.output }}" \
|
|
81
|
+
--assets "${{ inputs.assets_dir }}" \
|
|
82
|
+
--github-user "${{ steps.detect-user.outputs.user }}" \
|
|
83
|
+
--github-token "$GITHUB_TOKEN" \
|
|
84
|
+
${{ inputs.fonts_dir != '' && format('--fonts-dir "{0}"', inputs.fonts_dir) || '' }}
|
|
85
|
+
|
|
86
|
+
- name: Commit and push changes
|
|
87
|
+
id: commit
|
|
88
|
+
if: inputs.auto_commit == 'true'
|
|
89
|
+
shell: bash
|
|
90
|
+
run: |
|
|
91
|
+
git config user.name "github-actions[bot]"
|
|
92
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
93
|
+
|
|
94
|
+
git add "${{ inputs.output }}" "${{ inputs.assets_dir }}"
|
|
95
|
+
|
|
96
|
+
if git diff --cached --quiet; then
|
|
97
|
+
echo "No changes to commit."
|
|
98
|
+
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
99
|
+
else
|
|
100
|
+
git commit -m "${{ inputs.commit_message }}"
|
|
101
|
+
git push
|
|
102
|
+
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
103
|
+
echo "Committed and pushed updated README."
|
|
104
|
+
fi
|
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "readme-aura",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Next-Gen README generator for GitHub
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Next-Gen README generator for GitHub — render React/JSX components to SVG inside Markdown",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
6
|
"bin": {
|
|
10
7
|
"readme-aura": "./dist/cli.js"
|
|
11
8
|
},
|
|
@@ -28,6 +25,10 @@
|
|
|
28
25
|
"react",
|
|
29
26
|
"cli"
|
|
30
27
|
],
|
|
28
|
+
"files": [
|
|
29
|
+
"dist/",
|
|
30
|
+
"action.yml"
|
|
31
|
+
],
|
|
31
32
|
"license": "MIT",
|
|
32
33
|
"dependencies": {
|
|
33
34
|
"@fontsource/inter": "^5.2.8",
|