Skip to content

Commit 3714f91

Browse files
Move development and release sections to CONTRIBUTING.md
1 parent f6ba020 commit 3714f91

File tree

2 files changed

+89
-86
lines changed

2 files changed

+89
-86
lines changed

.github/CONTRIBUTING.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
## Development workflow
2+
3+
### 1. Install tools
4+
5+
#### Node.js
6+
7+
[**npm**](https://www.npmjs.com/) is used for dependency management.
8+
9+
Follow the installation instructions here:<br />
10+
https://nodejs.dev/en/download
11+
12+
### 2. Install dependencies
13+
14+
To work on the codebase you have to install all the dependencies:
15+
16+
```
17+
npm install
18+
```
19+
20+
### 3. Coding
21+
22+
Now you're ready to work some [TypeScript](https://www.typescriptlang.org/) magic!
23+
24+
Make sure to write or update tests for your work when appropriate.
25+
26+
### 4. Format code
27+
28+
Format the code to follow the standard style for the project:
29+
30+
```
31+
npm run format
32+
```
33+
34+
### 5. Run tests
35+
36+
To run the tests:
37+
38+
```
39+
npm run test
40+
```
41+
42+
### 6. Build
43+
44+
It is necessary to compile the code before it can be used by GitHub Actions. We check in the `node_modules` to provide runtime dependencies to the system using the Action, so be careful not to `git add` all the development dependencies you might have under your local `node_modules`.
45+
Remember to run these commands before committing any code changes:
46+
47+
```
48+
npm run build
49+
```
50+
51+
remove all the dependencies:
52+
53+
```
54+
rm -rf node_modules
55+
```
56+
57+
add back **only** the runtime dependencies:
58+
59+
```
60+
npm install --production
61+
```
62+
63+
check in the code that matters:
64+
65+
```
66+
git add lib node_modules
67+
```
68+
69+
### 7. Commit
70+
71+
Everything is now ready to make your contribution to the project, so commit it to the repository and submit a pull request.
72+
73+
Thanks!
74+
75+
## Release workflow
76+
77+
To release a new version of the Action the workflow should be the following:
78+
79+
1. If the release will increment the major version, update the action refs in the examples in README.md
80+
(e.g., `uses: arduino/setup-protoc@v1` -> `uses: arduino/setup-protoc@v2`).
81+
1. open a PR and request a review.
82+
1. After PR is merged, create a release, following the `vX.X.X` tag name convention.
83+
1. After the release, rebase the release branch for that major version (e.g., `v1` branch for the v1.x.x tags) on the tag.
84+
If no branch exists for the release's major version, create one.

README.md

Lines changed: 5 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -62,92 +62,6 @@ pass the default token with the `repo-token` variable:
6262
```
6363

6464

65-
## Development workflow
66-
67-
### 1. Install tools
68-
69-
#### Node.js
70-
71-
[**npm**](https://www.npmjs.com/) is used for dependency management.
72-
73-
Follow the installation instructions here:<br />
74-
https://nodejs.dev/en/download
75-
76-
### 2. Install dependencies
77-
78-
To work on the codebase you have to install all the dependencies:
79-
80-
```
81-
npm install
82-
```
83-
84-
### 3. Coding
85-
86-
Now you're ready to work some [TypeScript](https://www.typescriptlang.org/) magic!
87-
88-
Make sure to write or update tests for your work when appropriate.
89-
90-
### 4. Format code
91-
92-
Format the code to follow the standard style for the project:
93-
94-
```
95-
npm run format
96-
```
97-
98-
### 5. Run tests
99-
100-
To run the tests:
101-
102-
```
103-
npm run test
104-
```
105-
106-
### 6. Build
107-
108-
It is necessary to compile the code before it can be used by GitHub Actions. We check in the `node_modules` to provide runtime dependencies to the system using the Action, so be careful not to `git add` all the development dependencies you might have under your local `node_modules`.
109-
Remember to run these commands before committing any code changes:
110-
111-
```
112-
npm run build
113-
```
114-
115-
remove all the dependencies:
116-
117-
```
118-
rm -rf node_modules
119-
```
120-
121-
add back **only** the runtime dependencies:
122-
123-
```
124-
npm install --production
125-
```
126-
127-
check in the code that matters:
128-
129-
```
130-
git add lib node_modules
131-
```
132-
133-
### 7. Commit
134-
135-
Everything is now ready to make your contribution to the project, so commit it to the repository and submit a pull request.
136-
137-
Thanks!
138-
139-
## Release workflow
140-
141-
To release a new version of the Action the workflow should be the following:
142-
143-
1. If the release will increment the major version, update the action refs in the examples in README.md
144-
(e.g., `uses: arduino/setup-protoc@v1` -> `uses: arduino/setup-protoc@v2`).
145-
1. open a PR and request a review.
146-
1. After PR is merged, create a release, following the `vX.X.X` tag name convention.
147-
1. After the release, rebase the release branch for that major version (e.g., `v1` branch for the v1.x.x tags) on the tag.
148-
If no branch exists for the release's major version, create one.
149-
150-
15165
## Enable verbose logging for a pipeline
15266
Additional log events with the prefix ::debug:: can be enabled by setting the secret `ACTIONS_STEP_DEBUG` to `true`.
15367

@@ -162,3 +76,8 @@ Thank you!
16276

16377
e-mail contact: security@arduino.cc
16478

79+
## Contributing
80+
81+
To report bugs or make feature requests, please submit an issue: https://github.com/arduino/setup-protoc/issues
82+
83+
Pull requests are welcome! Please see the [contribution guidelines](.github/CONTRIBUTING.md) for information.

0 commit comments

Comments
 (0)