26 Commits

Author SHA1 Message Date
Trim21
fcdfcf50d1 fix test 2025-09-09 17:12:25 +00:00
Trim21
54fb0b2f4e fix test 2025-09-09 17:12:25 +00:00
Trim21
7a0f90a08f fix: fetch versions from release instead of tags 2025-09-09 17:12:25 +00:00
per1234
5ad05bed29 Update TypeScript code formatting for Prettier 3.x compliance
This project uses the default Prettier code style for TypeScript code.

The default value for the `trailingComma` configuration setting has been changed from `es5` to `all` in the Prettier
3.0.0 release. This caused the code to no longer be compliant with the new default Prettier code formatting style. The
formatting is hereby updated to the new Prettier style.
2023-07-06 07:11:02 -07:00
per1234
43e1bb8c37 Add support for all Task build architectures
Previously, the action could only install Task when the runner had an x86-64 or i386 architecture.

Since the GitHub-hosted runners are currently all x86-64, that is sufficient for most users. However, it is also
possible to use GitHub actions with self-hosted runners of other architectures. Task builds are available for more
architectures, so the action's code unnecessarily limited its utility.

Support for all architectures with available builds is hereby added.

In order to provide some possibility of automatic support for additional builds that may become available in the future,
if the action code does not contain a mapped value for the host architecture, the value from Node.js is used verbatim.
Because the mapping between the architecture value provided by Node.js to the filename suffix used in the Task build
archives is a bit confusing, I added mapping entries for all suffixes, even in the cases where the two values are equal.

Co-authored-by: Luca Bianconi <71259950+Bikappa@users.noreply.github.com>
2023-01-30 21:55:21 -08:00
Giuseppe Lumia
4b84788fcc Print installed Task version
This could be useful in case users don't specify an exact version (e.g.
`3.x`) but want to know what version of Task their CI actually ran.
2021-12-02 16:14:42 +01:00
per1234
e7ea1aa3ef Narrow caught exceptions
The update to 4.4.2 brings increased type strictness. Previously, exceptions were used in some catch blocks based on an
assumption of their type. But exceptions can have any type and that now results in errors (TS2345, TS2571). This is fixed
by narrowing the exceptions to the expected type before using them as such.
2021-09-01 03:35:11 -07:00
per1234
3b5eac6cd3 Remove unused tempDirectory definition code 2021-05-18 23:19:13 -07:00
per1234
5cf16d8439 Remove redundant default version code
The default value of the version input is defined in the action metadata, so having another default setting in the code
is purely redundant and doubles the maintenance effort required on every major release of Task (note that they already
went out of sync).
2021-05-07 14:16:52 -07:00
per1234
3c87b7b25a Reformat code with modern version of Prettier
The update to the latest Prettier version resulted in the code no longer being in compliance due to some changes to the
Prettier style.
2021-05-07 03:05:37 -07:00
per1234
6d4f58adcf Change project name to "arduino/setup-task"
Change project name to "arduino/setup-task"

The Task documentation consistently refers to the tool as "Task". Taskfile is the term used for Task's configuration file.
This action is setting up the Task tool, not setting up the Task configuration file, so "arduino/setup-task" is more
appropriate than "arduino/setup-taskfile".
2021-05-07 02:49:21 -07:00
per1234
c4078b9d76 Throw Error object instead of raw string 2021-05-06 23:54:57 -07:00
per1234
0265de1732 Don't reassign function parameters 2021-05-06 23:54:57 -07:00
per1234
3622fd66bf Use type-safe equality operators 2021-05-06 23:54:57 -07:00
per1234
ca491d4ce5 Don't use functions before their declarations 2021-05-06 23:54:57 -07:00
per1234
9bee96a9ff Run eslint --fix on code
Make all possible automated fixes for linting violations.
2021-05-06 23:54:56 -07:00
per1234
104baaad72 Remove extraneous text from license file
In order to be recognized by GitHub's automatic license detection system, the license file must contain only the exact
license text, which can be sourced from choosealicense.com. Please do not modify this file in any way.
2021-05-03 20:44:42 -07:00
Edoardo Tenani
c2076d27a6 skip computing version if a valid semver is passed
By skipping computing version is possible to remove dependency on GitHub
APIs to retrieve all available Task version.

This helps mitigating #65
2021-04-21 17:50:35 +02:00
Roberto Sora
ac9c8a4eae run linter 2019-10-25 14:47:12 +02:00
Roberto Sora
c59dd6a779 fixe typo and generate js 2019-10-25 14:38:37 +02:00
Roberto Sora
9d155c2a88 add support for client with Bearer token 2019-10-25 14:26:20 +02:00
Massimiliano Pippi
93f47f8dcf prettify setup-taskfile 2019-09-17 12:21:08 +02:00
Massimiliano Pippi
e4596161d2 look into the right token 2019-08-26 15:02:37 +02:00
Massimiliano Pippi
f0f199da8d fix bin folder 2019-08-24 17:19:28 +02:00
Massimiliano Pippi
c5b7571113 change default value 2019-08-24 16:56:06 +02:00
Massimiliano Pippi
3fcc6951ab import sources 2019-08-23 17:30:46 +02:00