@vavt/github-action-test 0.0.3

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.
@@ -0,0 +1,29 @@
1
+ name: Create An Issue
2
+ description: Describe a problem
3
+ labels:
4
+ - 'type: bug'
5
+ - needs-triage
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: Thank you for your participation. If you are looking for support, participate in the discussion from [here](https://github.com/imzbf/md-editor-v3/discussions).
10
+ - type: textarea
11
+ id: description
12
+ attributes:
13
+ label: Describe the issue
14
+ validations:
15
+ required: true
16
+ - type: input
17
+ id: version
18
+ attributes:
19
+ label: Procedure version
20
+ description: Describe your development environment, such as version of editor or `nodejs` or browser, etc
21
+ validations:
22
+ required: true
23
+ - type: input
24
+ id: reproduction
25
+ attributes:
26
+ label: Reproduction link
27
+ description: It can help me find problems quickly. If you provide an online code environment or a code repository or a `zip` file for code.
28
+ validations:
29
+ required: false
@@ -0,0 +1,29 @@
1
+ name: 创建一个Bug
2
+ description: 描述一下这个Bug
3
+ labels:
4
+ - 'type: bug'
5
+ - needs-triage
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: 感谢您的参与。如果您正在寻求帮助,请从[此处](https://github.com/imzbf/md-editor-v3/discussions)创建讨论。
10
+ - type: textarea
11
+ id: description
12
+ attributes:
13
+ label: 描述这个Bug
14
+ validations:
15
+ required: true
16
+ - type: input
17
+ id: version
18
+ attributes:
19
+ label: 版本号
20
+ description: 描述您的开发环境,例如编辑器、`nodejs`、浏览器的版本等。
21
+ validations:
22
+ required: true
23
+ - type: input
24
+ id: reproduction
25
+ attributes:
26
+ label: 问题重现链接
27
+ description: 如果您提供在线代码环境或代码存储库或代码的`zip`文件,它可以帮助我快速发现问题。
28
+ validations:
29
+ required: false
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Questions & Discussions
4
+ url: https://github.com/imzbf/md-editor-v3/discussions
5
+ about: Use discussions for Q&A and usage support.
6
+ - name: Security Vulnerability
7
+ url: https://github.com/imzbf/md-editor-v3/security/policy
8
+ about: Please report security issues responsibly.
@@ -0,0 +1,15 @@
1
+ name: Feature request
2
+ description: Suggest an idea for this project
3
+ labels:
4
+ - 'type: feature'
5
+ - needs-triage
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: Thank you for your participation.
10
+ - type: textarea
11
+ id: description
12
+ attributes:
13
+ label: A great idea
14
+ validations:
15
+ required: true
@@ -0,0 +1,15 @@
1
+ name: 功能建议
2
+ description: 为这个项目提供一个很棒的想法
3
+ labels:
4
+ - 'type: feature'
5
+ - needs-triage
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: 感谢您的参与。
10
+ - type: textarea
11
+ id: description
12
+ attributes:
13
+ label: 一个很棒的想法
14
+ validations:
15
+ required: true
@@ -0,0 +1,8 @@
1
+ 'type: bug':
2
+ - '/(bug|error|exception|crash|defect|regression|报错|异常|崩溃|问题)/i'
3
+ 'type: feature':
4
+ - '/(feature|enhancement|proposal|improve|优化|建议|功能|需求)/i'
5
+ 'type: docs':
6
+ - '/(doc|docs|documentation|文档)/i'
7
+ 'type: question':
8
+ - '/(question|how to|usage|help|咨询|请教|怎么|如何)/i'
@@ -0,0 +1,33 @@
1
+ - name: 'type: bug'
2
+ color: d73a4a
3
+ description: Something is not working
4
+ - name: 'type: feature'
5
+ color: a2eeef
6
+ description: New feature or enhancement request
7
+ - name: 'type: docs'
8
+ color: 0075ca
9
+ description: Documentation related
10
+ - name: 'type: question'
11
+ color: d876e3
12
+ description: Usage or support question
13
+ - name: needs-triage
14
+ color: fbca04
15
+ description: Needs maintainer triage
16
+ - name: stale
17
+ color: eeeeee
18
+ description: Inactive issue
19
+ - name: breaking-change
20
+ color: b60205
21
+ description: Includes breaking API/behavior changes
22
+ - name: dependencies
23
+ color: 0366d6
24
+ description: Dependency updates
25
+ - name: ci
26
+ color: 1d76db
27
+ description: CI/CD related changes
28
+ - name: chore
29
+ color: cfd3d7
30
+ description: Maintenance tasks
31
+ - name: skip-changelog
32
+ color: ffffff
33
+ description: Exclude from release notes/changelog
@@ -0,0 +1,25 @@
1
+ changelog:
2
+ categories:
3
+ - title: Breaking Changes
4
+ labels:
5
+ - breaking-change
6
+ - title: Features
7
+ labels:
8
+ - 'type: feature'
9
+ - enhancement
10
+ - title: Bug Fixes
11
+ labels:
12
+ - 'type: bug'
13
+ - bug
14
+ - title: Documentation
15
+ labels:
16
+ - 'type: docs'
17
+ - documentation
18
+ - title: Maintenance
19
+ labels:
20
+ - chore
21
+ - dependencies
22
+ - ci
23
+ exclude:
24
+ labels:
25
+ - skip-changelog
@@ -0,0 +1,36 @@
1
+ name: Npm Beta Publish
2
+
3
+ on:
4
+ push:
5
+ branches: [beta]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ publish:
12
+ name: Build And Publish
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout Code
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Get Node
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: 20
22
+ registry-url: https://registry.npmjs.org/
23
+
24
+ - name: Enable Corepack
25
+ run: corepack enable
26
+
27
+ - name: Install
28
+ run: yarn install --frozen-lockfile
29
+
30
+ - name: Build
31
+ run: yarn build
32
+
33
+ - name: Publish beta
34
+ run: npm publish --access public --tag beta
35
+ env:
36
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
@@ -0,0 +1,23 @@
1
+ name: Close Inactive Issues
2
+ on:
3
+ schedule:
4
+ - cron: '0 6 * * *' # 每天早上6点运行,github的cron表达式规则和其他的不太一致
5
+ workflow_dispatch:
6
+
7
+ jobs:
8
+ close-issues:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ issues: write
12
+ steps:
13
+ - uses: actions/stale@v10
14
+ with:
15
+ days-before-issue-stale: 14 # 14天无操作标记不活跃
16
+ days-before-issue-close: 14 # 再过14天不活跃关闭
17
+ stale-issue-label: 'stale'
18
+ stale-issue-message: 'This issue is stale because it has been open for 14 days with no activity.'
19
+ close-issue-message: 'This issue was closed because it has been inactive for 14 days since being marked as stale.'
20
+ days-before-pr-stale: -1
21
+ days-before-pr-close: -1
22
+ exempt-issue-labels: 'pinned,security,release-blocker'
23
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,23 @@
1
+ name: Issue Auto Label
2
+
3
+ on:
4
+ issues:
5
+ types: [opened, edited, reopened]
6
+
7
+ permissions:
8
+ contents: read
9
+ issues: write
10
+
11
+ jobs:
12
+ label:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout Code
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Label issue by title and body
19
+ uses: github/issue-labeler@v3.4
20
+ with:
21
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
22
+ configuration-path: .github/issue-labeler.yml
23
+ enable-versioned-regex: 0
@@ -0,0 +1,27 @@
1
+ name: Sync Labels
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - develop
8
+ paths:
9
+ - .github/labels.yml
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+ issues: write
15
+
16
+ jobs:
17
+ sync:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - name: Checkout Code
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Sync repository labels
24
+ uses: crazy-max/ghaction-github-labeler@v5
25
+ with:
26
+ github-token: ${{ secrets.GITHUB_TOKEN }}
27
+ yaml-file: .github/labels.yml
@@ -0,0 +1,98 @@
1
+ name: Npm Latest Publish
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - v*
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ publish:
13
+ name: Build Publish And Release
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout Code
17
+ uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - name: Get Node
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: 20
25
+ registry-url: https://registry.npmjs.org/
26
+
27
+ - name: Enable Corepack
28
+ run: corepack enable
29
+
30
+ - name: Install
31
+ run: yarn install --frozen-lockfile
32
+
33
+ - name: Build
34
+ run: yarn build
35
+
36
+ - name: Publish to npm
37
+ run: npm publish --access public
38
+ env:
39
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
40
+
41
+ - name: Create GitHub Release
42
+ uses: softprops/action-gh-release@v2
43
+ with:
44
+ tag_name: ${{ github.ref_name }}
45
+ generate_release_notes: true
46
+ make_latest: true
47
+ env:
48
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49
+
50
+ - name: Update CHANGELOG.md
51
+ continue-on-error: true
52
+ env:
53
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54
+ TAG_NAME: ${{ github.ref_name }}
55
+ DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
56
+ run: |
57
+ set -euo pipefail
58
+
59
+ if [ ! -f CHANGELOG.md ]; then
60
+ printf '%s\n\n%s\n\n%s\n' \
61
+ '# Changelog' \
62
+ 'All notable changes to this project will be documented in this file.' \
63
+ '<!-- next-release -->' > CHANGELOG.md
64
+ fi
65
+
66
+ if grep -q "^## ${TAG_NAME} (" CHANGELOG.md; then
67
+ echo "CHANGELOG already contains ${TAG_NAME}, skip update."
68
+ exit 0
69
+ fi
70
+
71
+ NOTES="$(gh release view "${TAG_NAME}" --json body --jq '.body')"
72
+ DATE="$(date -u +%Y-%m-%d)"
73
+
74
+ printf '## %s (%s)\n\n%s\n\n%s\n' \
75
+ "${TAG_NAME}" \
76
+ "${DATE}" \
77
+ "${NOTES}" \
78
+ '<!-- next-release -->' > /tmp/release-entry.md
79
+
80
+ awk '
81
+ FNR==NR { entry = entry $0 ORS; next }
82
+ $0 == "<!-- next-release -->" { printf "%s", entry; next }
83
+ { print }
84
+ ' /tmp/release-entry.md CHANGELOG.md > /tmp/CHANGELOG.md
85
+
86
+ mv /tmp/CHANGELOG.md CHANGELOG.md
87
+
88
+ git config user.name "github-actions[bot]"
89
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
90
+ git add CHANGELOG.md
91
+
92
+ if git diff --cached --quiet; then
93
+ echo "No changelog change to commit."
94
+ exit 0
95
+ fi
96
+
97
+ git commit -m "docs(changelog): update for ${TAG_NAME}"
98
+ git push origin "HEAD:${DEFAULT_BRANCH}"
package/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ <!-- next-release -->
package/README.md ADDED
File without changes
@@ -0,0 +1,29 @@
1
+ import js from '@eslint/js'
2
+ import globals from 'globals'
3
+ import reactHooks from 'eslint-plugin-react-hooks'
4
+ import reactRefresh from 'eslint-plugin-react-refresh'
5
+ import { defineConfig, globalIgnores } from 'eslint/config'
6
+
7
+ export default defineConfig([
8
+ globalIgnores(['dist']),
9
+ {
10
+ files: ['**/*.{js,jsx}'],
11
+ extends: [
12
+ js.configs.recommended,
13
+ reactHooks.configs.flat.recommended,
14
+ reactRefresh.configs.vite,
15
+ ],
16
+ languageOptions: {
17
+ ecmaVersion: 2020,
18
+ globals: globals.browser,
19
+ parserOptions: {
20
+ ecmaVersion: 'latest',
21
+ ecmaFeatures: { jsx: true },
22
+ sourceType: 'module',
23
+ },
24
+ },
25
+ rules: {
26
+ 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
27
+ },
28
+ },
29
+ ])
package/index.html ADDED
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>github-action-test</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ <script type="module" src="/src/main.jsx"></script>
12
+ </body>
13
+ </html>
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@vavt/github-action-test",
3
+ "version": "0.0.3",
4
+ "type": "module",
5
+ "scripts": {
6
+ "dev": "vite",
7
+ "build": "vite build",
8
+ "lint": "eslint .",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^19.2.0",
13
+ "react-dom": "^19.2.0"
14
+ },
15
+ "devDependencies": {
16
+ "@eslint/js": "^9.39.1",
17
+ "@types/react": "^19.2.7",
18
+ "@types/react-dom": "^19.2.3",
19
+ "@vitejs/plugin-react": "^5.1.1",
20
+ "eslint": "^9.39.1",
21
+ "eslint-plugin-react-hooks": "^7.0.1",
22
+ "eslint-plugin-react-refresh": "^0.4.24",
23
+ "globals": "^16.5.0",
24
+ "vite": "^7.3.1"
25
+ }
26
+ }
package/src/main.jsx ADDED
@@ -0,0 +1,5 @@
1
+ const hello = () => {
2
+ console.log('Hello, World! 001');
3
+ };
4
+
5
+ hello();
package/vite.config.js ADDED
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ // https://vite.dev/config/
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ })