Skip to content

Commit a667bc9

Browse files
author
tytv2
committed
feat: initial release of GreenNode CLI v0.1.0
0 parents  commit a667bc9

108 files changed

Lines changed: 6706 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changes/0.1.0.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{
3+
"type": "feature",
4+
"category": "core",
5+
"description": "Initial release of Greenode CLI with VKS service support"
6+
}
7+
]

.changes/next-release/.gitkeep

Whitespace-only changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug in the Greenode CLI
4+
title: "[Bug] "
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
A clear and concise description of the bug.
12+
13+
## Steps to reproduce
14+
15+
```bash
16+
grn vks <command> ...
17+
```
18+
19+
## Expected behavior
20+
21+
What you expected to happen.
22+
23+
## Actual behavior
24+
25+
What actually happened. Include the full error output.
26+
27+
```
28+
Error: ...
29+
```
30+
31+
## Environment
32+
33+
- OS: [e.g. macOS 15.2, Ubuntu 24.04, Windows 11]
34+
- Python version: [e.g. 3.13.5]
35+
- Greenode CLI version: [output of `grn --version`]
36+
37+
## Additional context
38+
39+
Any other context about the problem (config, region, etc.)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or improvement
4+
title: "[Feature] "
5+
labels: feature
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
A clear description of the feature you'd like to see.
12+
13+
## Use case
14+
15+
Why do you need this feature? What problem does it solve?
16+
17+
## Proposed solution
18+
19+
How you think this should work:
20+
21+
```bash
22+
grn vks <new-command> --arg value
23+
```
24+
25+
## Alternatives considered
26+
27+
Any alternative solutions or workarounds you've considered.
28+
29+
## Additional context
30+
31+
Any other context, screenshots, or references.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Description
2+
3+
Brief description of what this PR does.
4+
5+
## Type of change
6+
7+
- [ ] Bug fix
8+
- [ ] New feature
9+
- [ ] Enhancement
10+
- [ ] Breaking change
11+
- [ ] Documentation
12+
13+
## Checklist
14+
15+
- [ ] Tests added/updated and passing (`python -m pytest tests/ -v`)
16+
- [ ] Changelog entry added (`./scripts/new-change`)
17+
- [ ] Documentation updated (if applicable)
18+
- [ ] Code follows existing patterns
19+
20+
## Related issues
21+
22+
Closes #

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
labels:
8+
- "dependencies"

.github/workflows/deploy-docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy Docs
2+
3+
env:
4+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
5+
6+
on:
7+
push:
8+
branches: [main]
9+
paths:
10+
- 'docs/**'
11+
- 'mkdocs.yml'
12+
13+
permissions:
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.13'
30+
31+
- name: Install MkDocs
32+
run: pip install mkdocs-material
33+
34+
- name: Build docs
35+
run: mkdocs build
36+
37+
- name: Upload Pages artifact
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: site/
41+
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Release
2+
3+
env:
4+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'Version to release (e.g. 0.2.0)'
14+
required: true
15+
16+
permissions:
17+
contents: write
18+
id-token: write
19+
20+
jobs:
21+
test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.13'
30+
31+
- name: Install and test
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install -e ".[dev]"
35+
python -m pytest tests/ -v --tb=short
36+
37+
build:
38+
needs: test
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Set up Python
44+
uses: actions/setup-python@v5
45+
with:
46+
python-version: '3.13'
47+
48+
- name: Install build tools
49+
run: python -m pip install --upgrade pip setuptools wheel build
50+
51+
- name: Determine version
52+
id: version
53+
run: |
54+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
55+
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
56+
else
57+
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
58+
fi
59+
60+
- name: Verify version matches __init__.py
61+
run: |
62+
EXPECTED="${{ steps.version.outputs.version }}"
63+
ACTUAL=$(python -c "import grncli; print(grncli.__version__)")
64+
if [ "$EXPECTED" != "$ACTUAL" ]; then
65+
echo "Version mismatch: tag=$EXPECTED, __init__.py=$ACTUAL"
66+
exit 1
67+
fi
68+
69+
- name: Build wheel and sdist
70+
run: python -m build
71+
72+
- name: Build offline bundle
73+
run: |
74+
pip install .
75+
bash scripts/make-bundle
76+
77+
- name: Upload PyPI artifacts
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: pypi-dist
81+
path: |
82+
dist/*.whl
83+
dist/*.tar.gz
84+
85+
- name: Upload bundle artifact
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: bundle
89+
path: dist/grncli-bundle.zip
90+
91+
github-release:
92+
needs: build
93+
runs-on: ubuntu-latest
94+
steps:
95+
- uses: actions/download-artifact@v4
96+
with:
97+
name: pypi-dist
98+
path: dist/
99+
100+
- uses: actions/download-artifact@v4
101+
with:
102+
name: bundle
103+
path: dist/
104+
105+
- name: Create GitHub Release
106+
uses: softprops/action-gh-release@v2
107+
with:
108+
tag_name: ${{ github.ref_name }}
109+
generate_release_notes: true
110+
files: |
111+
dist/*.whl
112+
dist/*.tar.gz
113+
dist/grncli-bundle.zip
114+
115+
publish-pypi:
116+
needs: build
117+
runs-on: ubuntu-latest
118+
environment: release
119+
steps:
120+
- uses: actions/download-artifact@v4
121+
with:
122+
name: pypi-dist
123+
path: dist/
124+
125+
- name: Publish to PyPI
126+
uses: pypa/gh-action-pypi-publish@release/v1
127+
with:
128+
password: ${{ secrets.PYPI_API_TOKEN }}
129+
attestations: false

.github/workflows/run-tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run Tests
2+
3+
env:
4+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
5+
6+
on:
7+
pull_request:
8+
branches: [main, develop]
9+
10+
jobs:
11+
test:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macos-latest]
17+
python-version: ['3.10', '3.13']
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -e ".[dev]"
31+
32+
- name: Run tests
33+
run: python -m pytest tests/ -v --tb=short

.github/workflows/stale.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Stale Issues
2+
3+
env:
4+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
5+
6+
on:
7+
schedule:
8+
- cron: '0 0 * * *'
9+
10+
permissions:
11+
issues: write
12+
13+
jobs:
14+
stale:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/stale@v9
18+
with:
19+
stale-issue-message: >
20+
This issue has been automatically marked as stale because it has not
21+
had recent activity. It will be closed if no further activity occurs
22+
within 7 days.
23+
days-before-stale: 30
24+
days-before-close: 7
25+
stale-issue-label: stale
26+
exempt-issue-labels: 'pinned,enhancement'

0 commit comments

Comments
 (0)