Skip to content

Commit b638bbc

Browse files
authored
Merge pull request #16 from per1234/always-pack
Change development policy to repackaging on every code change
2 parents 9862294 + 0ac78c3 commit b638bbc

File tree

4 files changed

+91
-30
lines changed

4 files changed

+91
-30
lines changed

.github/workflows/setup-taskflile.yml

+26
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,29 @@ jobs:
2929

3030
- name: npm test
3131
run: npm test
32+
33+
check-packaging:
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v2
39+
40+
- name: Setup Node.js
41+
uses: actions/setup-node@v2
42+
with:
43+
node-version: 12.x
44+
45+
- name: Install dependencies
46+
run: npm install
47+
48+
- name: Build action
49+
run: npm run build
50+
51+
- name: Package action
52+
run: npm run pack
53+
54+
- name: Check packaging
55+
# Ignoring CR because ncc's output has a mixture of line endings, while the repository should only contain
56+
# Unix-style EOL.
57+
run: git diff --ignore-cr-at-eol --color --exit-code dist

.github/workflows/test-integration.yml

-15
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ jobs:
3232
- name: Checkout local repository
3333
uses: actions/checkout@v2
3434

35-
- name: Build action
36-
run: |
37-
npm install
38-
npm run build
39-
4035
- name: Run action with defaults
4136
uses: ./ # Use the action from the local path.
4237

@@ -68,11 +63,6 @@ jobs:
6863
- name: Checkout local repository
6964
uses: actions/checkout@v2
7065

71-
- name: Build action
72-
run: |
73-
npm install
74-
npm run build
75-
7666
- name: Run action, using Task minor version wildcard
7767
uses: ./
7868
with:
@@ -91,11 +81,6 @@ jobs:
9181
- name: Checkout local repository
9282
uses: actions/checkout@v2
9383

94-
- name: Build action
95-
run: |
96-
npm install
97-
npm run build
98-
9984
- name: Run action, using invalid version
10085
id: setup-taskfile
10186
continue-on-error: true

CONTRIBUTING.md

+43-15
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,57 @@
1-
## Development
1+
## Development workflow
22

3-
To work on the codebase you have to install all the dependencies:
3+
### 1. Install dependencies
44

5-
```sh
6-
# npm install
75
```
6+
npm install
7+
```
8+
9+
### 2. Coding
10+
11+
Now you're ready to work some [TypeScript](https://www.typescriptlang.org/) magic!
12+
13+
Make sure to write or update tests for your work when appropriate.
14+
15+
### 2. Format code
16+
17+
Format the code to follow the standard style for the project:
18+
19+
```
20+
npm run format
21+
```
22+
23+
### 3. Run tests
824

9-
To run the tests:
25+
Run the tests to ensure that the code works as expected:
1026

11-
```sh
12-
# npm run test
1327
```
28+
npm run test
29+
```
30+
31+
### 4. Build
32+
33+
It is necessary to compile the code before it can be used by GitHub Actions. Remember to run these commands before committing any code changes:
34+
35+
```
36+
npm run build
37+
npm run pack
38+
```
39+
40+
### 3. Commit
41+
42+
Everything is now ready to make your contribution to the project, so commit it to the repository and submit a pull request.
43+
44+
Thanks!
1445

1546
## Enable verbose logging for a pipeline
1647
Additional log events with the prefix ::debug:: can be enabled by setting the secret `ACTIONS_STEP_DEBUG` to `true`.
1748

1849
See [step-debug-logs](https://github.com/actions/toolkit/blob/master/docs/action-debugging.md#step-debug-logs) for reference.
1950

20-
## Release
51+
## Release workflow
2152

22-
To release a new version of the Action the workflow should be the following:
53+
Instructions for releasing a new version of the action:
2354

24-
1. `npm install` to install the dependencies.
25-
1. `npm run test` to see everything works as expected.
26-
1. `npm run build` to build the Action under the `./lib` folder.
27-
1. `npm run pack` to package for distribution
28-
1. `git add src dist` to check in the code that matters.
29-
1. open a PR and request a review.
55+
1. If the release will increment the major version, update the action refs in the examples in README.md (e.g., `uses: arduino/setup-taskfile@v1` -> `uses: arduino/setup-taskfile@v2`).
56+
1. Create a [GitHub release](https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release), following the `vX.Y.Z` tag name convention. Make sure to follow [the SemVer specification](https://semver.org/).
57+
1. Rebase the release branch for that major version (e.g., `v1` branch for the `v1.x.x` tags) on the tag. If no branch exists for the release's major version, create one.

dist/index.js

+22
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66

77
"use strict";
88

9+
// Copyright (c) 2019 ARDUINO SA
10+
//
11+
// The software is released under the GNU General Public License, which covers the main body
12+
// of the arduino/setup-taskfile code. The terms of this license can be found at:
13+
// https://www.gnu.org/licenses/gpl-3.0.en.html
14+
//
15+
// You can be released from the requirements of the above licenses by purchasing
16+
// a commercial license. Buying such a license is mandatory if you want to modify or
17+
// otherwise use the software for commercial activities involving the Arduino
18+
// software without disclosing the source code of your own applications. To purchase
19+
// a commercial license, send an email to [email protected]
920
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
1021
return new (P || (P = Promise))(function (resolve, reject) {
1122
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -204,6 +215,17 @@ function normalizeVersion(version) {
204215

205216
"use strict";
206217

218+
// Copyright (c) 2019 ARDUINO SA
219+
//
220+
// The software is released under the GNU General Public License, which covers the main body
221+
// of the arduino/setup-taskfile code. The terms of this license can be found at:
222+
// https://www.gnu.org/licenses/gpl-3.0.en.html
223+
//
224+
// You can be released from the requirements of the above licenses by purchasing
225+
// a commercial license. Buying such a license is mandatory if you want to modify or
226+
// otherwise use the software for commercial activities involving the Arduino
227+
// software without disclosing the source code of your own applications. To purchase
228+
// a commercial license, send an email to [email protected]
207229
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
208230
return new (P || (P = Promise))(function (resolve, reject) {
209231
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }

0 commit comments

Comments
 (0)