Skip to content

Commit a6feeb7

Browse files
committed
Repackage action following typescript bump
GitHub downloads each action run in a workflow during runtime and executes it as a complete package of code before you can use workflow commands like run to interact with the runner machine. This means that we must provide all JavaScript package dependencies as part of the distributed action in order for it to be usable in workflows. A naive approach to doing this is checking in the `node_modules` folder. However, this approach results in a huge amount of frequently changing external content being included in the repository, much of which is not even part of the executed program. A far better approach is to use the excellent ncc tool to compile the program, including all the relevant code from the dependencies, into a single file. We use a "continuous packaging" approach, where the packaged action code that is generated via ncc is always kept in sync with the development source code and dependencies. This allows a beta version of the action to be easily used in workflows by beta testers or those who need changes not in the release simply by using the name of the branch as the action ref (e.g., `uses: arduino/arduino-lint-action@main` will cause the version of the action from the tip of the `main` branch to be used by the workflow run). The update of the package dependency results in a change to the packaged code, so the packaging is here updated accordingly.
1 parent adfc622 commit a6feeb7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: dist/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
3939
});
4040
};
4141
Object.defineProperty(exports, "__esModule", ({ value: true }));
42-
exports.getArduinoLint = void 0;
42+
exports.getArduinoLint = getArduinoLint;
4343
// Load tempDirectory before it gets wiped by tool-cache
4444
let tempDirectory = process.env["RUNNER_TEMP"] || "";
4545
const os = __importStar(__nccwpck_require__(2037));
@@ -86,7 +86,6 @@ function getArduinoLint(version) {
8686
return path.join(toolPath, "arduino-lint");
8787
});
8888
}
89-
exports.getArduinoLint = getArduinoLint;
9089
function downloadRelease(version) {
9190
return __awaiter(this, void 0, void 0, function* () {
9291
// Download

0 commit comments

Comments
 (0)