Skip to content

Commit 7b8fe91

Browse files
committed
chore(docs): more details
1 parent f25b463 commit 7b8fe91

2 files changed

Lines changed: 30 additions & 7 deletions

File tree

README.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# rust-template
22

3+
[![View](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fuplau%2Frust-template&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=View&edge_flat=false)](https://hits.seeyoufarm.com)
34
[![GitHub workflow status](https://github.com/uplau/rust-template/actions/workflows/generate.yaml/badge.svg)](https://github.com/uplau/rust-template/actions/workflows/generate.yaml)
45
[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](./LICENSE-MIT)
56

67
A github rust workflows template, just want to focus on coding.
78

9+
- [Who uses?](https://github.com/search?q=in%3Areadme+uplau%2Frust-template&type=repositories)
810
- [Demo template](https://github.com/uplau/rust-template-demo)
911
- [GitHub Actions](https://github.com/uplau/rust-template/actions/workflows/generate.yaml)
1012
- [Workflow file](.github/workflows/generate.yaml)
@@ -53,8 +55,21 @@ This will not affect your Github, give it a try:
5355
5. When all work is done, at the bottom of the workflow summary page, download template artifacts.
5456
6. Enjoy!
5557

56-
> When running for the first time, the cache needs to be created.
57-
> Next time, soon.
58+
> ⬆️ When running for the first time, the cache needs to be created. Next time, soon.
59+
60+
**If need directly create your Github repository, in addition to all the above steps, you also need:**
61+
62+
1. [Creating a fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token).
63+
64+
> Repository access: `All repositories`
65+
66+
> Permissions > Repository permissions: `Administration` `Contents` `Workflows` > Access: `Read and write`
67+
68+
2. Copy personal access token.
69+
70+
3. [Creating encrypted secrets for a repository](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository).
71+
> Name field:
72+
> `PAT_CREATE_REPO`
5873
5974
### Use cargo-generate
6075

@@ -74,7 +89,7 @@ cargo generate --git https://github.com/uplau/rust-template ./template --name "c
7489
| ----------------- | ---------- | -------- | --------------------------------------------------------------------- |
7590
| crate-name | string | required | Package name |
7691
| crate-type | bin or lib | bin | [Linkage](https://doc.rust-lang.org/reference/linkage.html) |
77-
| owner | string | required | Owner, for filling README and LICENSE |
92+
| owner | string | required | Owner, for filling README and LICENSE and note `Cargo.toml` |
7893
| copyright-year | string | 2023 | Copyright year, for filling LICENSE |
7994
| use-badge | bool | true | Insert status badge to README top |
8095
| use-contrib-rocks | bool | false | Insert [contrib.rocks](https://contrib.rocks/) to README#Contributors |
@@ -83,11 +98,19 @@ cargo generate --git https://github.com/uplau/rust-template ./template --name "c
8398

8499
## Template workflows
85100

86-
> This document is not exhaustive, [see](./template/.github/workflows/cicd.yaml)
101+
Workflows of `bin` can be view:
102+
103+
- [automatic summary](https://github.com/uplau/rust-template-demo/actions/runs/5672076317)
104+
- [release please PR](https://github.com/uplau/rust-template-demo/pull/1)
105+
- [automatic release](https://github.com/uplau/rust-template-demo/releases/tag/v0.1.0)
106+
- [manually summary](https://github.com/uplau/rust-template-demo/actions/runs/5671922967)
107+
- [manually release](https://github.com/uplau/rust-template-demo/releases/tag/next)
108+
- [workflow file](https://github.com/uplau/rust-template-demo/blob/main/.github/workflows/cicd.yaml)
87109

88-
The workflows of `bin` can be [view summary here](https://github.com/uplau/rust-template-demo/actions/runs/5644583514), [view file here](https://github.com/uplau/rust-template-demo/blob/main/.github/workflows/cicd.yaml).
110+
Workflows of `lib` can be view:
89111

90-
The workflows of `lib` can be [view summary here](https://github.com/uplau/rust-template-demo/actions/runs/5644157705), [view file here](https://github.com/uplau/rust-template-demo/blob/lib-default-use/.github/workflows/cicd.yaml).
112+
- [manually summary](https://github.com/uplau/rust-template-demo/actions/runs/5671896111)
113+
- [workflow file](https://github.com/uplau/rust-template-demo/blob/lib-default-use/.github/workflows/cicd.yaml)
91114

92115
### `jobs.release_please`
93116

template/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
## Contributing{% if use-rust-template %}
1515

16-
This project uses [rust-template](https://github.com/uplau/rust-template) to start.{%- endif %}
16+
This repository was created with [rust-template](https://github.com/uplau/rust-template).{%- endif %}
1717

1818
See the [contributing guidelines](./CONTRIBUTING.md) for more information.{% if use-contrib-rocks %}
1919

0 commit comments

Comments
 (0)