Skip to content

Commit 8b17cde

Browse files
colyerdengShawnDen-coder
authored andcommitted
feat: update project template github action
- update github action config - update project template github action - fix `project.toml` tag
1 parent 96ceaea commit 8b17cde

File tree

8 files changed

+17
-20
lines changed

8 files changed

+17
-20
lines changed

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22

33
### Feat
44

5-
- update `project.toml` readme type
6-
- update `project.toml` readme type
75
- update template config
86
- update github action,and update config

cookiecutter.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"template-python": {
44
"path": "./template-python",
55
"title": "python",
6-
"description": "A cookiecutter template for python project"
6+
"description": "template for python project"
77
}
88
}
99
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "repo-scaffold"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
description = "shawn deng repo temple project"
55
authors = ["shawndeng <[email protected]>"]
66
license = "MIT"

repo_scaffold/cli.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
def cli():
2626
"""Repository scaffolding CLI tool.
2727
28-
Commands:
29-
create: Generate a new project from template
28+
A tool for creating new projects from templates.
3029
"""
3130
...
3231

@@ -41,13 +40,13 @@ def cli():
4140
@click.option("--output-dir", "-o", default=".", help="Where to output the generated project dir")
4241
@click.option("--local", "-l", is_flag=True, help="Use local template in ./template-python")
4342
def create(template, output_dir, local):
44-
"""Create a new project from template.
43+
r"""Create a new project from template.
4544
46-
Args:
47-
template: Template source URL or path
48-
output_dir: Target directory for new project
49-
local: Use local template instead of remote
45+
\b
46+
Usage:
47+
repo-scaffold create [OPTIONS]
5048
49+
\b
5150
Examples:
5251
$ repo-scaffold create
5352
$ repo-scaffold create --local

template-python/{{cookiecutter.project_slug}}/.github/workflows/bump_version.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717
with:
1818
export-env: true
1919
env:
20-
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
20+
OP_SERVICE_ACCOUNT_TOKEN: {% raw %}${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}{% endraw %}
2121
PERSONAL_ACCESS_TOKEN: op://shawndengdev/github_access_token/credential
2222

2323
- name: Check out
2424
uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
27-
token: '${{ env.PERSONAL_ACCESS_TOKEN }}'
27+
token: '{% raw %}${{ env.PERSONAL_ACCESS_TOKEN }}{% endraw %}'
2828

2929
- name: Create bump and changelog
3030
uses: commitizen-tools/commitizen-action@master
3131
with:
32-
github_token: ${{ env.PERSONAL_ACCESS_TOKEN }}
32+
github_token: {% raw %}${{ env.PERSONAL_ACCESS_TOKEN }}{% endraw %}
3333
branch: master

template-python/{{cookiecutter.project_slug}}/.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
with:
1212
export-env: true
1313
env:
14-
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
14+
OP_SERVICE_ACCOUNT_TOKEN: {% raw %}${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}{% endraw %}
1515
PERSONAL_ACCESS_TOKEN: op://shawndengdev/github_access_token/credential
1616

1717
- name: Check out
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21-
token: '${{ env.PERSONAL_ACCESS_TOKEN }}'
21+
token: '{% raw %}${{ env.PERSONAL_ACCESS_TOKEN }}{% endraw %}'
2222

2323
- uses: actions/setup-python@v5
2424
with:

template-python/{{cookiecutter.project_slug}}/.github/workflows/release_build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
export-env: true
1818
env:
19-
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
19+
OP_SERVICE_ACCOUNT_TOKEN: {% raw %}${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}{% endraw %}
2020
PERSONAL_ACCESS_TOKEN: op://shawndengdev/github_access_token/credential
2121
PYPI_TOKEN: op://shawndengdev/pypi_token/credential
2222

@@ -33,7 +33,7 @@ jobs:
3333

3434
- name: build and publish
3535
run: |
36-
poetry config pypi-token.pypi ${{ env.PYPI_TOKEN }}
36+
poetry config pypi-token.pypi {% raw %}${{ env.PYPI_TOKEN }}{% endraw %}
3737
poetry install
3838
poetry run nox -s lint
3939
poetry run nox -s test
@@ -51,4 +51,4 @@ jobs:
5151
dist/*.whl
5252
generate_release_notes: true
5353
env:
54-
GITHUB_TOKEN: ${{ env.PERSONAL_ACCESS_TOKEN }}
54+
GITHUB_TOKEN: {% raw %}${{ env.PERSONAL_ACCESS_TOKEN }}{% endraw %}

template-python/{{cookiecutter.project_slug}}/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test(session: nox.Session) -> None:
5757
session.run("poetry", "install")
5858
session.run(
5959
"pytest",
60-
"--cov={{{{cookiecutter.project_slug}}}}",
60+
"--cov={{cookiecutter.project_slug}}",
6161
"--cov-report=term-missing",
6262
"--cov-report=xml",
6363
"-v",

0 commit comments

Comments
 (0)