Skip to content

Change development policy to repackaging on every code change #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/setup-taskflile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,29 @@ jobs:

- name: npm test
run: npm test

check-packaging:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 12.x

- name: Install dependencies
run: npm install

- name: Build action
run: npm run build

- name: Package action
run: npm run pack

- name: Check packaging
# Ignoring CR because ncc's output has a mixture of line endings, while the repository should only contain
# Unix-style EOL.
run: git diff --ignore-cr-at-eol --color --exit-code dist
15 changes: 0 additions & 15 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ jobs:
- name: Checkout local repository
uses: actions/checkout@v2

- name: Build action
run: |
npm install
npm run build

- name: Run action with defaults
uses: ./ # Use the action from the local path.

Expand Down Expand Up @@ -68,11 +63,6 @@ jobs:
- name: Checkout local repository
uses: actions/checkout@v2

- name: Build action
run: |
npm install
npm run build

- name: Run action, using Task minor version wildcard
uses: ./
with:
Expand All @@ -91,11 +81,6 @@ jobs:
- name: Checkout local repository
uses: actions/checkout@v2

- name: Build action
run: |
npm install
npm run build

- name: Run action, using invalid version
id: setup-taskfile
continue-on-error: true
Expand Down
58 changes: 43 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,57 @@
## Development
## Development workflow

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

```sh
# npm install
```
npm install
```

### 2. Coding

Now you're ready to work some [TypeScript](https://www.typescriptlang.org/) magic!

Make sure to write or update tests for your work when appropriate.

### 2. Format code

Format the code to follow the standard style for the project:

```
npm run format
```

### 3. Run tests

To run the tests:
Run the tests to ensure that the code works as expected:

```sh
# npm run test
```
npm run test
```

### 4. Build

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:

```
npm run build
npm run pack
```

### 3. Commit

Everything is now ready to make your contribution to the project, so commit it to the repository and submit a pull request.

Thanks!

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

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

## Release
## Release workflow

To release a new version of the Action the workflow should be the following:
Instructions for releasing a new version of the action:

1. `npm install` to install the dependencies.
1. `npm run test` to see everything works as expected.
1. `npm run build` to build the Action under the `./lib` folder.
1. `npm run pack` to package for distribution
1. `git add src dist` to check in the code that matters.
1. open a PR and request a review.
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`).
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/).
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.
22 changes: 22 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@

"use strict";

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

"use strict";

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