Compare commits

...

170 Commits

Author SHA1 Message Date
Richard Shiue
1c5eb12d81 fix: specify pub cache path (#280) 2024-03-20 11:20:53 +07:00
Koji Wakamiya
62f096cacd Update README (#266)
* doc: Update README

* fix: Specify the dev channel version
2024-02-13 07:52:27 +07:00
Jørgen Tjernø
844082558d Improvements to caching (#265)
* Bump actions/cache to v4 to suppress node warnings

* Respect `PUB_CACHE` from the environment

* Cache pub-cache separately from flutter

In order to reduce the extra work that happens when you update your
pubspec.lock, don't use `hashFiles('**/pubspec.lock')` in the hash of
the flutter installation, and separately cache the `.pubspec-cache`.

Also return the `.pub-cache` to `$HOME`, since it's not part of the tool
installation.

* Fix README example of pub-cache-path and document `PUB_CACHE`
2024-02-13 07:13:38 +07:00
Koji Wakamiya
14bf5302ef Set architecture options from runner's architecture (#264)
* feat: Add ARCH_NAME variable and set default ARCH value

* chore: Show runner's os and architecture

* chore: Update actions
2024-02-05 09:06:33 +07:00
Devon Carew
02b923c0e1 add support for the main channel (#258)
* add support for the main channel

* update testing for the 'main' channel
2023-11-20 16:29:45 +07:00
Alif Rachmawadi
aa6d9b9844 update cache test 2023-11-01 18:11:33 +07:00
Alif Rachmawadi
2783a3f08e ensure setup.sh executable; fixes #245 2023-11-01 17:59:30 +07:00
Daren Hayward
c33c37022b Extract to a temporary location to enable moving of flutter folder. (#227) 2023-11-01 17:50:15 +07:00
Gustl22
cc97e1648f feat: Allow git ref as version in master channel (#237)
* feat: Allow git ref as version in `master` channel

* fix lint

* fix parsing

* fix test

* fix checkout, add tests

* replace with tab
2023-10-11 15:55:21 +07:00
Alif Rachmawadi
ed388baf1d fixes #224; update readme 2023-06-24 16:31:51 +07:00
Alif Rachmawadi
48cafc2471 re-add master channel support 2023-03-23 05:52:25 +07:00
Alif Rachmawadi
1508160852 adjust filter by arch 2023-03-22 08:45:49 +07:00
Alif Rachmawadi
88cab4064b add restore-keys cache support 2023-03-21 22:20:05 +07:00
Alif Rachmawadi
55a58f6493 make simpler 2023-03-21 21:49:20 +07:00
Alif Rachmawadi
d369dd765d make simpler 2023-03-21 21:46:00 +07:00
Alif Rachmawadi
42b3ed07e1 make simpler 2023-03-21 21:45:02 +07:00
Alif Rachmawadi
8dbc29a898 make simpler 2023-03-21 21:42:52 +07:00
Alif Rachmawadi
ed0e860e8f make simpler 2023-03-21 21:37:50 +07:00
Alif Rachmawadi
37734c707c update test fixtures 2023-03-21 21:31:03 +07:00
Alif Rachmawadi
b1ba330d99 update test fixtures 2023-03-21 21:25:27 +07:00
Alif Rachmawadi
43c32c5d3a update test fixtures 2023-03-21 20:55:50 +07:00
Alif Rachmawadi
dbf1fa04f4 Replace set-output with $GITHUB_OUTPUT; fixes #192 (#194)
* replace set-output with $GITHUB_OUTPUT

* use stdout for test mode

* update readme
2022-10-13 06:31:27 +07:00
Adrien Padol
1e6ee87cb8 Added missing parameter for cache-key (#187) 2022-09-17 07:11:03 +07:00
Alif Rachmawadi
45dd344cec github sponsor 2022-09-08 11:37:17 +07:00
Alif Rachmawadi
de3cdb9a4b enhance set output 2022-09-08 09:12:35 +07:00
Alif Rachmawadi
1e952778af enhance set output 2022-09-08 00:57:19 +07:00
Alif Rachmawadi
9d48f4efd5 use named arguments for version and arch 2022-08-25 17:24:16 +07:00
Alif Rachmawadi
6c2e035f26 fix test manifest load 2022-07-26 17:47:54 +07:00
Alif Rachmawadi
c30358aafe dynamic cache path 2022-07-26 13:20:39 +07:00
Alif Rachmawadi
472d887f68 update readme 2022-07-26 11:56:47 +07:00
Alif Rachmawadi
b1d33bca25 print version 2022-07-25 19:47:52 +07:00
Alif Rachmawadi
e5fb13927b update readme 2022-07-25 19:36:41 +07:00
Alif Rachmawadi
ebff0a3874 tidy up 2022-07-25 19:15:22 +07:00
Alif Rachmawadi
d8cf9a8ccc tidy up 2022-07-25 18:58:09 +07:00
Alif Rachmawadi
e09ab0131a remove opencollective 2022-07-24 21:17:47 +07:00
Alif Rachmawadi
becfb71246 shellcheck linter 2022-07-24 19:30:59 +07:00
Alif Rachmawadi
54864698df test mode and cache key builder (#175) 2022-07-24 19:19:31 +07:00
Alif Rachmawadi
ea686d7c56 check jq 2022-07-19 12:00:34 +07:00
Alif Rachmawadi
9c6ea81337 check jq, fixes #170 2022-07-19 06:32:29 +07:00
Jiun Kim
29ad5bdaf4 Update for any-version on any-channel (#155)
* Update for testing any-version on any-channel

* Update `latest_version` and Add `latest_channel_version`
2022-06-05 16:06:25 +07:00
Jiun Kim
0c3f14223a Update cache-key with Runner.os and Arch (#152)
* Add `${{ runner.os }}` on cache-key

* Add `${{ inputs.architecture }}` as Cache-key
2022-04-29 09:03:21 +07:00
Jiun Kim
0f2cd3391b Update architecture default as runner.arch (#153)
* Update architecture default as `runner.arch`

* Update to convert `ARCH` as lowercase

* Refactor for `ARCH` variable
2022-04-29 07:52:26 +07:00
Jiun Kim
cf0b7b2cac Update for actions/cache version to 3 (#150) 2022-04-27 10:24:59 +07:00
Alif Rachmawadi
d8687e6979 add open collective funding 2022-04-20 06:42:47 +07:00
Goooler
2fcd5629bc Bump actions/checkout to v3 (#145) 2022-04-19 17:54:50 +07:00
菘菘
6a13bd0836 feat: support to set architecture of SDK executable (#147)
* feat: support to set architecture of SDK executable

* docs: update

* fix: try fix tests

* ci: set `fail-fast` to false

* fix: get latest version sdk

* fix: test any version

* fix: legacy version format

* fix: tests

* revert changes for `.github/workflows/workflow.yml`

* Update workflow.yml

* rename `ARCHITECTURE` to `ARCH`

* follow the existing spacing

* style: simplified code

* Update setup.sh

* style
2022-04-19 16:08:46 +07:00
Alif Rachmawadi
f0cc0311e0 update .pub-cache location 2022-03-31 12:45:08 +07:00
Alif Rachmawadi
5e1529bc12 update readme 2022-02-07 23:42:26 +00:00
Alif Rachmawadi
99cf4656b5 Merge pull request #134 from kuhnroyal/temp-folder-windows
Fix temp folder handling on windows
2022-02-04 23:44:20 +07:00
Peter Leibiger
b3c14e7ecc Fix temp folder handling on windows
Something with the globing seems not work but not sure exactly. Now using a simple way of ensure that the target folder never exists when calling `mv` so that it behaves as a rename instead of a move into. The folder still needs to be created first so that parent folders (in case of a custom cache path) are created.
2022-02-04 17:30:43 +01:00
Alif Rachmawadi
05b7251cb1 Merge pull request #133 from davidmigloz/main
Remove dev channel mentions
2022-02-04 18:19:49 +07:00
David Miguel Lozano
2d3283596d Remove dev channel 2022-02-04 12:04:07 +01:00
Alif Rachmawadi
b5a1c34304 run workflow on pull request 2022-02-04 10:30:09 +00:00
Alif Rachmawadi
77740fc108 Merge pull request #132 from kuhnroyal/temp-folder
Download and unzip to temp folder and not $HOME
2022-02-04 17:24:54 +07:00
Peter Leibiger
36e70a6528 Download and unzip to temp folder and not $HOME 2022-02-03 23:50:13 +01:00
Alif Rachmawadi
d5878a0492 quiet unzip (fixes #130)
Some checks failed
Main workflow / test_channel (beta, macos-latest) (push) Failing after 2s
Main workflow / test_channel (dev, macos-latest) (push) Failing after 2s
Main workflow / test_channel (stable, macos-latest) (push) Failing after 2s
Main workflow / test_cache (macos-latest) (push) Failing after 3s
Main workflow / test_channel (stable, ubuntu-latest) (push) Failing after 33s
Main workflow / test_version (2.5.3) (push) Failing after 33s
Main workflow / test_cache (ubuntu-latest) (push) Failing after 17s
Main workflow / test_channel (beta, ubuntu-latest) (push) Failing after 17s
Main workflow / test_channel (dev, ubuntu-latest) (push) Failing after 1m38s
Main workflow / test_version (1) (push) Failing after 32s
Main workflow / test_version (2.x) (push) Failing after 32s
Main workflow / test_version (v1.12) (push) Failing after 6m16s
Main workflow / test_any_channel (push) Failing after 8s
Main workflow / test_channel (beta, windows-latest) (push) Has been cancelled
Main workflow / test_master_channel (push) Has been cancelled
Main workflow / test_channel (dev, windows-latest) (push) Has been cancelled
Main workflow / test_channel (stable, windows-latest) (push) Has been cancelled
Main workflow / test_cache (windows-latest) (push) Has been cancelled
2022-01-24 04:44:12 +00:00
Alif Rachmawadi
31089a7435 update readme
Some checks failed
Main workflow / test_channel (beta, macos-latest) (push) Failing after 2s
Main workflow / test_cache (macos-latest) (push) Failing after 3s
Main workflow / test_channel (dev, macos-latest) (push) Failing after 2s
Main workflow / test_channel (stable, macos-latest) (push) Failing after 2s
Main workflow / test_channel (beta, ubuntu-latest) (push) Failing after 6m31s
Main workflow / test_channel (stable, ubuntu-latest) (push) Failing after 10s
Main workflow / test_version (v1.12) (push) Failing after 25s
Main workflow / test_any_channel (push) Failing after 16s
Main workflow / test_channel (dev, ubuntu-latest) (push) Failing after 18s
Main workflow / test_version (1) (push) Failing after 9s
Main workflow / test_version (2.5.3) (push) Failing after 8s
Main workflow / test_version (2.x) (push) Failing after 9s
Main workflow / test_cache (ubuntu-latest) (push) Failing after 18s
Main workflow / test_channel (beta, windows-latest) (push) Has been cancelled
Main workflow / test_channel (dev, windows-latest) (push) Has been cancelled
Main workflow / test_channel (stable, windows-latest) (push) Has been cancelled
Main workflow / test_master_channel (push) Has been cancelled
Main workflow / test_cache (windows-latest) (push) Has been cancelled
2022-01-13 11:02:57 +00:00
Alif Rachmawadi
4f5d1c6d12 add cache path option 2022-01-13 10:46:00 +00:00
Alif Rachmawadi
03e576dcd6 actions/cache integration
Some checks failed
Main workflow / test_channel (beta, macos-latest) (push) Failing after 1s
Main workflow / test_channel (stable, macos-latest) (push) Failing after 2s
Main workflow / test_cache (macos-latest) (push) Failing after 3s
Main workflow / test_channel (dev, macos-latest) (push) Failing after 2s
Main workflow / test_channel (beta, ubuntu-latest) (push) Failing after 49s
Main workflow / test_channel (dev, ubuntu-latest) (push) Failing after 9s
Main workflow / test_channel (stable, ubuntu-latest) (push) Failing after 9s
Main workflow / test_version (1) (push) Failing after 8s
Main workflow / test_version (2.5.3) (push) Failing after 9s
Main workflow / test_version (2.x) (push) Failing after 9s
Main workflow / test_version (v1.12) (push) Failing after 20s
Main workflow / test_any_channel (push) Failing after 15s
Main workflow / test_cache (ubuntu-latest) (push) Failing after 10s
Main workflow / test_channel (beta, windows-latest) (push) Has been cancelled
Main workflow / test_channel (dev, windows-latest) (push) Has been cancelled
Main workflow / test_channel (stable, windows-latest) (push) Has been cancelled
Main workflow / test_master_channel (push) Has been cancelled
Main workflow / test_cache (windows-latest) (push) Has been cancelled
2022-01-10 04:45:27 +00:00
Alif Rachmawadi
f95a8c953b add actions/cache support
Some checks failed
Main workflow / test_channel (beta, ubuntu-latest) (push) Failing after 8s
Main workflow / test_channel (dev, ubuntu-latest) (push) Failing after 18s
Main workflow / test_channel (stable, ubuntu-latest) (push) Failing after 8s
Main workflow / test_version (2.5.3) (push) Failing after 33s
Main workflow / test_any_channel (push) Failing after 15s
Main workflow / test_version (1) (push) Failing after 2m16s
Main workflow / test_version (2.x) (push) Failing after 32s
Main workflow / test_version (v1.12) (push) Failing after 23s
Main workflow / test_with_cache (push) Failing after 1m15s
Main workflow / test_channel (beta, macos-latest) (push) Failing after 3s
Main workflow / test_channel (dev, macos-latest) (push) Failing after 2s
Main workflow / test_channel (stable, macos-latest) (push) Failing after 2s
Main workflow / test_channel (beta, windows-latest) (push) Has been cancelled
Main workflow / test_channel (dev, windows-latest) (push) Has been cancelled
Main workflow / test_channel (stable, windows-latest) (push) Has been cancelled
Main workflow / test_master_channel (push) Has been cancelled
2022-01-07 04:54:02 +00:00
Alif Rachmawadi
3dae472464 update readme 2022-01-06 16:00:13 +00:00
Alif Rachmawadi
523b0faa40 update readme for linux desktop dependencies (closes #49) 2022-01-06 11:45:16 +00:00
Alif Rachmawadi
813937b170 update readme for desktop build (closes #86) 2022-01-06 11:17:49 +00:00
Alif Rachmawadi
8af4ab61aa update readme 2022-01-06 11:12:10 +00:00
Alif Rachmawadi
59a5481c7d fix PUB_CACHE env
Some checks failed
Main workflow / test_channel (beta, ubuntu-latest) (push) Failing after 16s
Main workflow / test_channel (dev, ubuntu-latest) (push) Failing after 16s
Main workflow / test_version (1) (push) Failing after 7s
Main workflow / test_version (v1.12) (push) Failing after 14s
Main workflow / test_channel (stable, ubuntu-latest) (push) Failing after 19s
Main workflow / test_version (2.5.3) (push) Failing after 7s
Main workflow / test_version (2.x) (push) Failing after 14s
Main workflow / test_any_channel (push) Failing after 15s
Main workflow / test_channel (beta, macos-latest) (push) Failing after 2s
Main workflow / test_channel (dev, macos-latest) (push) Failing after 2s
Main workflow / test_channel (stable, macos-latest) (push) Failing after 2s
Main workflow / test_channel (dev, windows-latest) (push) Has been cancelled
Main workflow / test_channel (stable, windows-latest) (push) Has been cancelled
Main workflow / test_master_channel (push) Has been cancelled
Main workflow / test_channel (beta, windows-latest) (push) Has been cancelled
2022-01-06 10:46:35 +00:00
Alif Rachmawadi
4686a99fc5 update readme
Some checks failed
Main workflow / test_channel (stable, macos-latest) (push) Failing after 3s
Main workflow / test_channel (beta, macos-latest) (push) Failing after 2s
Main workflow / test_channel (dev, macos-latest) (push) Failing after 2s
Main workflow / test_channel (beta, ubuntu-latest) (push) Failing after 15s
Main workflow / test_channel (dev, ubuntu-latest) (push) Failing after 9s
Main workflow / test_channel (stable, ubuntu-latest) (push) Failing after 8s
Main workflow / test_version (1) (push) Failing after 7s
Main workflow / test_version (2.5.3) (push) Failing after 14s
Main workflow / test_version (2.x) (push) Failing after 8s
Main workflow / test_version (v1.12) (push) Failing after 8s
Main workflow / test_any_channel (push) Failing after 8s
Main workflow / test_channel (beta, windows-latest) (push) Has been cancelled
Main workflow / test_channel (dev, windows-latest) (push) Has been cancelled
Main workflow / test_channel (stable, windows-latest) (push) Has been cancelled
Main workflow / test_master_channel (push) Has been cancelled
2022-01-06 09:55:43 +00:00
Alif Rachmawadi
2f01469b02 remove unused files
Some checks failed
Main workflow / test_channel (beta, ubuntu-latest) (push) Failing after 10s
Main workflow / test_channel (dev, ubuntu-latest) (push) Failing after 15s
Main workflow / test_channel (stable, ubuntu-latest) (push) Failing after 19s
Main workflow / test_version (1) (push) Failing after 15s
Main workflow / test_version (2.5.3) (push) Failing after 16s
Main workflow / test_version (2.x) (push) Failing after 8s
Main workflow / test_any_channel (push) Failing after 15s
Main workflow / test_version (v1.12) (push) Failing after 9s
Main workflow / test_channel (beta, macos-latest) (push) Failing after 2s
Main workflow / test_channel (dev, macos-latest) (push) Failing after 1s
Main workflow / test_channel (stable, macos-latest) (push) Failing after 2s
Main workflow / test_channel (beta, windows-latest) (push) Has been cancelled
Main workflow / test_channel (dev, windows-latest) (push) Has been cancelled
Main workflow / test_channel (stable, windows-latest) (push) Has been cancelled
Main workflow / test_master_channel (push) Has been cancelled
2022-01-06 09:31:17 +00:00
Alif Rachmawadi
f6d2e5de5d update readme 2022-01-06 09:23:09 +00:00
Alif Rachmawadi
f5fec4dcb7 remove unused files 2022-01-06 09:22:58 +00:00
Alif Rachmawadi
37e2edb15e add any channel 2022-01-06 09:21:17 +00:00
Alif Rachmawadi
c64fa18722 add master channel 2022-01-06 09:05:37 +00:00
Alif Rachmawadi
a3bd2fdf17 add version matrix test 2022-01-06 08:57:24 +00:00
Alif Rachmawadi
a7e6ec0df9 add PUBCACHE 2022-01-06 08:48:07 +00:00
Alif Rachmawadi
23835ee500 add dart bin to path 2022-01-06 08:45:45 +00:00
Alif Rachmawadi
84b5c35087 download archive 2022-01-06 08:38:04 +00:00
Alif Rachmawadi
365543a8d9 update env name 2022-01-06 07:51:59 +00:00
Alif Rachmawadi
49d7a2a9ae rewrite flutter-action 2022-01-06 07:48:39 +00:00
Alif Rachmawadi
409aab1aac Merge pull request #119 from subosito/dependabot/npm_and_yarn/ansi-regex-5.0.1
Bump ansi-regex from 5.0.0 to 5.0.1
2021-11-17 15:46:32 +07:00
Alif Rachmawadi
f0c3acec24 Merge pull request #95 from tianhaoz95/fix/update-java-requirements
chore: migrate setup java in the instructions to v2
2021-11-17 15:28:02 +07:00
dependabot[bot]
399a47813e Bump ansi-regex from 5.0.0 to 5.0.1
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-17 08:27:53 +00:00
Alif Rachmawadi
87ca224aa8 Merge pull request #114 from subosito/dependabot/npm_and_yarn/tmpl-1.0.5
Bump tmpl from 1.0.4 to 1.0.5
2021-11-17 15:27:12 +07:00
dependabot[bot]
a1905c800f Bump tmpl from 1.0.4 to 1.0.5
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-21 11:54:45 +00:00
Alif Rachmawadi
14cf1a3f11 Merge pull request #111 from subosito/dependabot/npm_and_yarn/path-parse-1.0.7
Bump path-parse from 1.0.6 to 1.0.7
2021-08-13 16:11:10 +07:00
dependabot[bot]
858d2d954a Bump path-parse from 1.0.6 to 1.0.7
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-11 08:46:00 +00:00
Alif Rachmawadi
4389e6cbc6 re-use new releases assets url path
Some checks failed
Main workflow / Run (ubuntu-latest) (push) Failing after 33s
Main workflow / Run (macos-latest) (push) Failing after 3s
Main workflow / Run (windows-latest) (push) Has been cancelled
2021-06-14 02:47:16 +00:00
Alif Rachmawadi
a471b152dc Merge pull request #97 from subosito/dependabot/npm_and_yarn/ws-7.4.6
Some checks failed
Main workflow / Run (ubuntu-latest) (push) Failing after 10m41s
Main workflow / Run (macos-latest) (push) Failing after 4s
Main workflow / Run (windows-latest) (push) Has been cancelled
Bump ws from 7.4.5 to 7.4.6
2021-06-11 15:33:35 +07:00
dependabot[bot]
56a652e69d Bump ws from 7.4.5 to 7.4.6
Bumps [ws](https://github.com/websockets/ws) from 7.4.5 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.5...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 08:20:48 +00:00
Alif Rachmawadi
8e1e9c4d87 update dist 2021-06-11 08:19:02 +00:00
Alif Rachmawadi
017da32f19 update dependencies 2021-06-11 08:18:38 +00:00
Alif Rachmawadi
cb226e935b Back to original path of release assets 2021-06-11 08:13:00 +00:00
Alif Rachmawadi
5188e41281 Merge pull request #100 from chatsen/master
Some checks failed
Main workflow / Run (ubuntu-latest) (push) Failing after 16m22s
Main workflow / Run (macos-latest) (push) Failing after 3s
Main workflow / Run (windows-latest) (push) Has been cancelled
Fix the endpoint for flutter releases
2021-06-02 10:48:10 +07:00
William Bulin
1ced41a989 Update index.js 2021-06-02 01:38:26 +02:00
William Bulin
4ac301c302 Update release.ts 2021-06-02 01:36:53 +02:00
Tianhao Zhou
5c3d315241 fix: add missing arguments for java setup 2021-05-17 01:10:08 -07:00
Alif Rachmawadi
0600af6a5c Merge pull request #93 from subosito/dependabot/npm_and_yarn/hosted-git-info-2.8.9
Bump hosted-git-info from 2.7.1 to 2.8.9
2021-05-15 14:04:20 +07:00
dependabot[bot]
1c63d3b831 Bump hosted-git-info from 2.7.1 to 2.8.9
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.7.1 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.7.1...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 01:25:41 +00:00
Alif Rachmawadi
086f9fb649 Merge pull request #90 from kuhnroyal/feature/pub-cache
Export PUB_CACHE if it is not in env
2021-05-01 08:31:38 +07:00
Peter Leibiger
8f6ad7c383 Export PUB_CACHE if it is not in env
Export `PUB_CACHE` if it is not configured before calling the action.
This ensures that flutter and dart use the same cache.
It also enables other tools to use this official Dart env variable.
2021-04-28 20:43:14 +02:00
Alif Rachmawadi
13141e86c3 update readme
Some checks failed
Main workflow / Run (ubuntu-latest) (push) Failing after 10m31s
Main workflow / Run (macos-latest) (push) Failing after 3s
Main workflow / Run (windows-latest) (push) Has been cancelled
2021-04-26 14:56:05 +00:00
Alif Rachmawadi
41992c08db adjust windows example 2021-04-26 14:49:19 +00:00
Alif Rachmawadi
d94ad8f4a5 Merge pull request #68 from majudhu/patch-1
add example to build for windows
2021-04-26 21:47:15 +07:00
Alif Rachmawadi
7bb7a2ead1 pin prettier 2021-04-26 14:35:27 +00:00
Alif Rachmawadi
08d7837173 update dist 2021-04-26 14:31:40 +00:00
Alif Rachmawadi
cb118effe2 update dependencies 2021-04-26 14:30:05 +00:00
Alif Rachmawadi
8c0828b9c2 update readme 2021-04-26 14:24:54 +00:00
Alif Rachmawadi
30d8b6aed2 update tests 2021-04-26 14:24:40 +00:00
Alif Rachmawadi
e7b018ff3a Merge pull request #83 from subosito/dependabot/npm_and_yarn/y18n-4.0.1
Bump y18n from 4.0.0 to 4.0.1
2021-04-02 20:14:32 +07:00
dependabot[bot]
267db14c3d Bump y18n from 4.0.0 to 4.0.1
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-30 22:16:18 +00:00
Alif Rachmawadi
123325ea84 Merge pull request #79 from jpnurmi/pub-cache-path
Add .pub-cache/bin to PATH
2021-03-07 19:03:55 +07:00
J-P Nurmi
06a5370154 Add .pub-cache/bin to PATH 2021-03-05 18:29:25 +01:00
Alif Rachmawadi
5781588262 Merge pull request #71 from subosito/dependabot/npm_and_yarn/node-notifier-8.0.1
Bump node-notifier from 8.0.0 to 8.0.1
2021-01-07 09:38:37 +07:00
dependabot[bot]
2d5af0bae8 Bump node-notifier from 8.0.0 to 8.0.1
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-22 08:02:28 +00:00
Alif Rachmawadi
d2a92405ab update examples 2020-12-01 15:49:09 +00:00
Alif Rachmawadi
c1329a99f0 fix test 2020-12-01 15:44:22 +00:00
Alif Rachmawadi
618ffe6e1a Merge pull request #67 from dmitry-shibanov/add-any-channel
Add any channel
2020-12-01 22:08:51 +07:00
Majudhu
1b4d6c711f add example to build for windows
add example script which will build a windows executable and also upload it to action artifacts
2020-11-25 14:07:49 +05:00
Dmitry Shibanov
2ed9c88ae0 build project 2020-11-23 16:13:25 +03:00
Dmitry Shibanov
d8b5280c4b add any channel 2020-11-23 16:11:57 +03:00
Alif Rachmawadi
8ffad233a0 Merge pull request #66 from sidrao2006/patch-1
Use FLUTTER_ROOT instead of FLUTTER_HOME
2020-11-21 05:57:49 +07:00
Aneesh Rao
2dc29df57b Use FLUTTER_ROOT instead of FLUTTER_HOME 2020-11-19 20:31:28 +05:30
Alif Rachmawadi
d141f1640a Merge pull request #64 from cclauss/patch-1
README.md: actions/checkout@v2
2020-10-20 20:03:42 +07:00
Christian Clauss
c4e0544d9c fixup! Fix typo 2020-10-20 14:50:34 +02:00
Christian Clauss
2ff7205390 README.md: actions/checkout@v2 2020-10-14 12:50:28 +02:00
Alif Rachmawadi
4a44bbb8a6 update dist 2020-10-08 04:42:13 +00:00
Alif Rachmawadi
d7578c4eec add support for master channel 2020-10-08 04:36:23 +00:00
Alif Rachmawadi
26bf50084a update test platform map
Some checks failed
Main workflow / Run (ubuntu-latest) (push) Failing after 16m21s
Main workflow / Run (macos-latest) (push) Failing after 2s
Main workflow / Run (windows-latest) (push) Has been cancelled
2020-10-08 01:36:34 +00:00
Alif Rachmawadi
45483e4c19 increase test timeout 2020-10-08 01:32:27 +00:00
Alif Rachmawadi
6f4d1ee832 use exact prettier 2020-10-08 01:26:57 +00:00
Alif Rachmawadi
58a4d54c5d update dist 2020-10-08 01:24:34 +00:00
Alif Rachmawadi
d0e7441034 update installer 2020-10-08 01:22:27 +00:00
Alif Rachmawadi
c7c0640db8 add release version check function 2020-10-08 01:22:02 +00:00
Alif Rachmawadi
1aaec8dd0f update dependencies 2020-10-08 01:20:47 +00:00
Alif Rachmawadi
ddb7b913ca update test data 2020-10-08 01:19:56 +00:00
Alif Rachmawadi
0b6cdde020 Merge pull request #60 from subosito/dependabot/npm_and_yarn/actions/core-1.2.6
Bump @actions/core from 1.2.4 to 1.2.6
2020-10-07 19:26:56 +07:00
dependabot[bot]
8078702ac6 Bump @actions/core from 1.2.4 to 1.2.6
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.4 to 1.2.6.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-01 17:17:20 +00:00
Alif Rachmawadi
282b38c3d9 Merge pull request #30 from AlessioLuciani/master
Add iOS and Android app bundle builds
2020-08-14 10:12:00 +07:00
Alif Rachmawadi
12d5ce54d2 Merge pull request #53 from subosito/dependabot/npm_and_yarn/lodash-4.17.19
Bump lodash from 4.17.15 to 4.17.19
2020-07-22 17:03:20 +07:00
dependabot[bot]
d00139d608 Bump lodash from 4.17.15 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-18 00:09:06 +00:00
Alessio Luciani
5d4e01ab3b Add build instructions for the web 2020-06-19 16:13:08 +02:00
Alif Rachmawadi
40bc2f6940 bump version
Some checks failed
Main workflow / Run (ubuntu-latest) (push) Failing after 39m38s
Main workflow / Run (macos-latest) (push) Failing after 3s
Main workflow / Run (windows-latest) (push) Has been cancelled
2020-05-09 11:03:06 +07:00
Alif Rachmawadi
f0d790518f update dist 2020-05-09 10:37:01 +07:00
Alif Rachmawadi
c4a41752bd update dependencies 2020-05-09 10:36:22 +07:00
Alif Rachmawadi
929035d687 update test 2020-05-09 10:17:16 +07:00
Alif Rachmawadi
4bb529986f use channel for latest release 2020-05-09 09:46:10 +07:00
Alif Rachmawadi
ecb8eabe6f update tests 2020-05-09 09:43:40 +07:00
Alif Rachmawadi
cf426f9aa2 update release manifest 2020-05-09 09:43:05 +07:00
Alif Rachmawadi
794e42ad48 bump version: 1.3.1
Some checks failed
Main workflow / Run (macos-latest) (push) Failing after 3s
Main workflow / Run (ubuntu-latest) (push) Failing after 19m55s
Main workflow / Run (windows-latest) (push) Has been cancelled
2020-04-30 09:48:20 +07:00
Alif Rachmawadi
2dd537cc3f update dist 2020-04-30 09:47:38 +07:00
Alif Rachmawadi
3ba093556e Merge pull request #36 from subosito/dependabot/npm_and_yarn/actions/http-client-1.0.8
Bump @actions/http-client from 1.0.7 to 1.0.8
2020-04-30 09:45:20 +07:00
dependabot[bot]
9cde868c41 Bump @actions/http-client from 1.0.7 to 1.0.8
Bumps [@actions/http-client](https://github.com/actions/http-client) from 1.0.7 to 1.0.8.
- [Release notes](https://github.com/actions/http-client/releases)
- [Changelog](https://github.com/actions/http-client/blob/master/RELEASES.md)
- [Commits](https://github.com/actions/http-client/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-04-29 18:01:31 +00:00
Alif Rachmawadi
c1bf65eb31 add dart usage example
Some checks failed
Main workflow / Run (macos-latest) (push) Failing after 3s
Main workflow / Run (ubuntu-latest) (push) Failing after 33s
Main workflow / Run (windows-latest) (push) Has been cancelled
2020-04-14 02:34:44 +00:00
Alif Rachmawadi
cfb544479d use previous prettier 2020-04-14 02:31:17 +00:00
Alif Rachmawadi
c256877acc bump version 2020-04-14 02:20:56 +00:00
Alif Rachmawadi
5c02dc7f05 update dist 2020-04-14 02:19:57 +00:00
Alif Rachmawadi
4d34db08ae update dependencies 2020-04-14 02:19:33 +00:00
Alif Rachmawadi
b4d02d2183 update test duration 2020-04-14 02:05:13 +00:00
Alif Rachmawadi
713f696c59 update test 2020-04-14 01:47:20 +00:00
Alif Rachmawadi
c8f591812e update dist 2020-04-14 01:17:42 +00:00
Alif Rachmawadi
f7a5d4550a handle new release format 2020-04-14 01:14:56 +00:00
Alif Rachmawadi
19074769c8 add test for new release format 2020-04-14 01:14:55 +00:00
Alif Rachmawadi
1b5073106b update releases data 2020-04-14 01:14:55 +00:00
Alif Rachmawadi
a8119581ff npm audit fix 2020-04-14 01:14:54 +00:00
Alif Rachmawadi
0ee5f96289 Merge pull request #33 from tianhaoz95/patch-2
might be interesting to add dart SDK to path
2020-04-14 07:57:34 +07:00
Tianhao Zhou
9d3762c82e fix: use join to comply with other os 2020-04-13 14:41:49 -07:00
Tianhao Zhou
6ebddd1b83 fix: add the missing bin directory in dart sdk 2020-04-11 18:23:34 -07:00
Tianhao Zhou
a79364fc11 dev: add dart sdk to path
Adding Flutter bin to the path doesn't expose the dart SDK which many people might be interested in using. For example, dartdoc for documentation generation.
2020-04-11 18:10:01 -07:00
Alessio Luciani
a81c830097 Add iOS and Android app bundle builds
Solving issue https://github.com/subosito/flutter-action/issues/7 .
2020-04-09 14:40:15 +02:00
Alif Rachmawadi
f4209dc839 force minimist resolution 2020-03-17 09:38:25 +07:00
Alif Rachmawadi
cf2fb6cf42 update depedencies 2020-03-17 09:06:14 +07:00
Alif Rachmawadi
8828996b00 fix acorn vulnerabilities 2020-03-17 09:00:22 +07:00
21 changed files with 14305 additions and 17977 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
github: [subosito]

View File

@@ -1,22 +1,146 @@
name: Main workflow
on: [push]
on:
push:
branches:
- main
- dev
pull_request:
paths:
- setup.sh
- action.yml
jobs:
run:
name: Run
lint_shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ludeeus/action-shellcheck@master
test_channel:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
channel: [stable, beta, master]
include:
- operating-system: ubuntu-latest
channel: main
steps:
- uses: actions/checkout@v4
- id: flutter-action
uses: ./
with:
channel: ${{ matrix.channel }}
- name: Echo outputs
run: |
echo RUNNER-OS=${{ runner.os }}
echo RUNNER-ARCH=${{ runner.arch }}
echo CACHE-PATH=${{ steps.flutter-action.outputs.CACHE-PATH }}
echo CACHE-KEY=${{ steps.flutter-action.outputs.CACHE-KEY }}
echo CHANNEL=${{ steps.flutter-action.outputs.CHANNEL }}
echo VERSION=${{ steps.flutter-action.outputs.VERSION }}
echo ARCHITECTURE=${{ steps.flutter-action.outputs.ARCHITECTURE }}
shell: bash
- run: dart --version
shell: bash
- run: flutter --version
shell: bash
test_cache:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set Node.js 10.x
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: ./
with:
node-version: 10.x
- name: npm install
run: npm install
- name: Lint
run: npm run format-check
- name: npm test
run: npm test
channel: stable
flutter-version: '3.10.6'
cache: true
- run: dart --version
shell: bash
- run: flutter --version
shell: bash
test_print_output:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: ./setup.sh -t -p | grep 'stable'
shell: bash
- run: ./setup.sh -t -p | grep '3.7.7'
shell: bash
- run: ./setup.sh -t -p | grep 'x64'
shell: bash
- run: ./setup.sh -t -p stable | grep 'stable'
shell: bash
- run: ./setup.sh -t -p beta | grep 'beta'
shell: bash
- run: ./setup.sh -t -p beta | grep '3.9.0-0.1.pre'
shell: bash
- run: ./setup.sh -t -p -n 3.3.10 stable | grep '3.3.10'
shell: bash
- run: ./setup.sh -t -p -n 3.3.1 stable | grep '3.3.1'
shell: bash
- run: ./setup.sh -t -p -n 2 stable | grep '2.10.5'
shell: bash
- run: ./setup.sh -t -p -n 2 beta | grep '2.13.0-0.4.pre'
shell: bash
- run: ./setup.sh -t -p -n 2 any | grep 'beta'
shell: bash
- run: ./setup.sh -t -p -n 2 any | grep '2.13.0-0.4.pre'
shell: bash
- run: ./setup.sh -t -p -n 3 any | grep 'beta'
shell: bash
- run: ./setup.sh -t -p -n 3 any | grep '3.9.0-0.1.pre'
shell: bash
- run: ./setup.sh -t -p -n 3 -a arm64 any | grep 'arm64'
shell: bash
- run: ./setup.sh -t -p -n any -a arm64 stable | grep 'stable'
shell: bash
- run: ./setup.sh -t -p -n any -a arm64 stable | grep '3.7.7'
shell: bash
- run: ./setup.sh -t -p -n any -a arm64 stable | grep 'arm64'
shell: bash
- run: ./setup.sh -t -p -n 1 stable | grep '1.22.6'
shell: bash
- run: ./setup.sh -t -p -n 0 any | grep 'beta'
shell: bash
- run: ./setup.sh -t -p -n 0 any | grep '0.11.13'
shell: bash
- run: ./setup.sh -t -p | grep 'flutter-macos-stable-3.7.7-x64-2ad6cd72c040113b47ee9055e722606a490ef0da'
shell: bash
- run: ./setup.sh -t -p stable | grep 'flutter-macos-stable-3.7.7-x64-2ad6cd72c040113b47ee9055e722606a490ef0da'
shell: bash
- run: ./setup.sh -t -p beta | grep 'flutter-macos-beta-3.9.0-0.1.pre-x64-f732038a8cf4562ce38a1d7debb30209ae3da896'
shell: bash
- run: ./setup.sh -t -p dev | grep 'flutter-macos-dev-2.11.0-0.1.pre-x64-b101bfe32f634566e7cb2791a9efe19cf8828b15'
shell: bash
- run: ./setup.sh -t -p master | grep 'flutter-macos-master-any-x64-master'
shell: bash
- run: ./setup.sh -t -p -n 5b12b74 master | grep 'flutter-macos-master-5b12b74-x64-master'
shell: bash
- run: ./setup.sh -t -p -n 3.12.0-12.0.pre master | grep 'flutter-macos-master-3.12.0-12.0.pre-x64-master'
shell: bash
- run: ./setup.sh -t -p -n stable master | grep 'flutter-macos-master-stable-x64-master'
shell: bash
- run: ./setup.sh -t -p -n 2 any | grep 'flutter-macos-beta-2.13.0-0.4.pre-x64-25caf1461b8f643092a9f6f5b224453b5c057d10'
shell: bash
- run: ./setup.sh -t -p -n 1 any | grep 'flutter-macos-beta-1.26.0-17.8.pre-x64-044f2cf5607a26f8818dab0f766400e85c52bdff'
shell: bash
- run: ./setup.sh -t -p -n 0 any | grep 'flutter-macos-beta-0.11.13-x64-58c8489fcdb4e4ef6c010117584c9b23d15221aa'
shell: bash
- run: ./setup.sh -t -p | grep '/Users/runner/work/_temp/flutter/stable-3.7.7-x64'
shell: bash
- run: ./setup.sh -t -p stable | grep '/Users/runner/work/_temp/flutter/stable-3.7.7-x64'
shell: bash
- run: ./setup.sh -t -p beta | grep '/Users/runner/work/_temp/flutter/beta-3.9.0-0.1.pre-x64'
shell: bash
- run: ./setup.sh -t -p dev | grep '/Users/runner/work/_temp/flutter/dev-2.11.0-0.1.pre-x64'
shell: bash
- run: ./setup.sh -t -p master | grep '/Users/runner/work/_temp/flutter/master-any-x64'
shell: bash
- run: ./setup.sh -t -p -k 'custom-:channel:-:version:-:hash:' | grep 'custom-stable-3.7.7-2ad6cd72c040113b47ee9055e722606a490ef0da'
shell: bash
- run: ./setup.sh -t -p -k 'custom-:channel:-:version:-:sha256:' | grep 'custom-stable-3.7.7-78957b52f023a0d811add27eddc59b1a59d27d2ada5df123f39d0315708fb2d5'
shell: bash
- run: ./setup.sh -t -p -c '/tmp/flutter/:channel:-:version:-:hash:' | grep '/tmp/flutter/stable-3.7.7-2ad6cd72c040113b47ee9055e722606a490ef0da'
shell: bash

3
.gitignore vendored
View File

@@ -1,3 +0,0 @@
node_modules/
lib/
__tests__/runner/*

View File

@@ -1,11 +0,0 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid",
"parser": "typescript"
}

208
README.md
View File

@@ -1,77 +1,197 @@
# flutter-action
This action sets up a flutter environment for use in actions. It works on Linux, Windows, and macOS.
Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
# Usage
## Usage
Use specific version and channel:
```yaml
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.9.1+hotfix.6'
- run: flutter pub get
- run: flutter test
- run: flutter build apk
flutter-version: '3.16.9'
channel: 'stable'
- run: flutter --version
```
Use latest release for particular channel:
```yaml
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
channel: 'stable' # or: 'dev' or 'beta'
- run: flutter pub get
- run: flutter test
- run: flutter build apk
channel: 'stable' # or: 'beta', 'dev', 'master' (or 'main')
- run: flutter --version
```
Use latest release for particular version and/or channel:
```yaml
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
flutter-version: '1.22.x'
channel: 'dev'
- run: flutter --version
```
Use particular version on any channel:
```yaml
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '1.12.x' # you can use 1.12
channel: 'dev' # optional, default to: 'stable'
flutter-version: '3.x'
channel: 'any'
- run: flutter --version
```
Use particular git reference on master channel:
```yaml
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '5b12b74' # tag, commit or branch
channel: 'master'
- run: flutter --version
```
Build Android APK and app bundle:
```yaml
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.9'
- run: flutter pub get
- run: flutter test
- run: flutter build apk
- run: flutter build appbundle
```
Matrix Testing:
Build for iOS (macOS only):
```yaml
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.11.0'
channel: 'beta'
- run: flutter pub get
- run: flutter test
- run: flutter build apk
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter test
- run: flutter build ios --release --no-codesign
```
Build for the web:
```yaml
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter test
- run: flutter build web
```
Build for Windows:
```yaml
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter build windows
```
Build for Linux desktop:
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- run: flutter build linux
```
Build for macOS desktop:
```yaml
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter build macos
```
Integration with `actions/cache`:
```yaml
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
pub-cache-key: 'flutter-pub:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache of dart pub get dependencies
pub-cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
- run: flutter --version
```
Note: `cache-key`, `pub-cache-key`, and `cache-path` has support for several dynamic values:
- `:os:`
- `:channel:`
- `:version:`
- `:arch:`
- `:hash:`
- `:sha256:`
Use outputs from `flutter-action`:
```yaml
steps:
- uses: actions/checkout@v4
- id: flutter-action
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: |
echo CACHE-PATH=${{ steps.flutter-action.outputs.CACHE-PATH }}
echo CACHE-KEY=${{ steps.flutter-action.outputs.CACHE-KEY }}
echo CHANNEL=${{ steps.flutter-action.outputs.CHANNEL }}
echo VERSION=${{ steps.flutter-action.outputs.VERSION }}
echo ARCHITECTURE=${{ steps.flutter-action.outputs.ARCHITECTURE }}
echo PUB-CACHE-PATH=${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
echo PUB-CACHE-KEY=${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
shell: bash
```

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,109 +0,0 @@
import io = require('@actions/io');
import fs = require('fs');
import path = require('path');
import nock = require('nock');
const toolDir = path.join(__dirname, 'runner', 'tools');
const tempDir = path.join(__dirname, 'runner', 'temp');
const dataDir = path.join(__dirname, 'data');
process.env['RUNNER_TOOL_CACHE'] = toolDir;
process.env['RUNNER_TEMP'] = tempDir;
import * as installer from '../src/installer';
function osName(): string {
switch (process.platform) {
case 'win32':
return 'windows';
case 'darwin':
return 'macos';
default:
return process.platform;
}
}
describe('installer tests', () => {
beforeAll(async () => {
await io.rmRF(toolDir);
await io.rmRF(tempDir);
}, 300000);
afterAll(async () => {
try {
await io.rmRF(toolDir);
await io.rmRF(tempDir);
} catch {
console.log('Failed to remove test directories');
}
}, 100000);
it('Downloads flutter', async () => {
await installer.getFlutter('1.0.0', 'stable');
const sdkDir = path.join(toolDir, 'flutter', '1.0.0-stable', 'x64');
expect(fs.existsSync(`${sdkDir}.complete`)).toBe(true);
expect(fs.existsSync(path.join(sdkDir, 'bin'))).toBe(true);
}, 100000);
it('Downloads flutter from beta channel', async () => {
await installer.getFlutter('1.8.3', 'beta');
const sdkDir = path.join(toolDir, 'flutter', '1.8.3-beta', 'x64');
expect(fs.existsSync(`${sdkDir}.complete`)).toBe(true);
expect(fs.existsSync(path.join(sdkDir, 'bin'))).toBe(true);
}, 100000);
describe('get the latest release of a flutter version', () => {
beforeEach(() => {
const platform = osName();
nock('https://storage.googleapis.com', {allowUnmocked: true})
.get(`/flutter_infra/releases/releases_${platform}.json`)
.replyWithFile(200, path.join(dataDir, `releases_${platform}.json`));
});
afterEach(() => {
nock.cleanAll();
nock.enableNetConnect();
});
it('Downloads latest flutter release from stable channel', async () => {
await installer.getFlutter('', 'stable');
const sdkDir = path.join(
toolDir,
'flutter',
'1.7.8-hotfix.4-stable',
'x64'
);
expect(fs.existsSync(`${sdkDir}.complete`)).toBe(true);
expect(fs.existsSync(path.join(sdkDir, 'bin'))).toBe(true);
}, 200000);
it('Downloads latest flutter release of 1.7 when using version 1.7 from dev channel', async () => {
await installer.getFlutter('1.7', 'dev');
const sdkDir = path.join(toolDir, 'flutter', '1.7.11-dev', 'x64');
expect(fs.existsSync(`${sdkDir}.complete`)).toBe(true);
expect(fs.existsSync(path.join(sdkDir, 'bin'))).toBe(true);
}, 200000);
it('Downloads latest flutter release of 1.7 when using version 1.7.x from dev channel', async () => {
await installer.getFlutter('1.7.x', 'dev');
const sdkDir = path.join(toolDir, 'flutter', '1.7.11-dev', 'x64');
expect(fs.existsSync(`${sdkDir}.complete`)).toBe(true);
expect(fs.existsSync(path.join(sdkDir, 'bin'))).toBe(true);
}, 200000);
});
it('Throws if no location contains correct flutter version', async () => {
let thrown = false;
try {
await installer.getFlutter('1000.0', 'dev');
} catch {
thrown = true;
}
expect(thrown).toBe(true);
});
});

View File

@@ -1,17 +1,79 @@
name: 'Flutter action'
description: 'Setup your runner with Flutter environment'
author: 'Alif Rachmawadi'
branding:
icon: 'maximize'
color: 'blue'
inputs:
flutter-version:
description: 'The Flutter version to make available on the path'
required: false
default: 'any'
channel:
description: 'The Flutter build release channel'
required: false
default: 'stable'
cache:
description: 'Cache the Flutter SDK'
required: false
default: 'false'
cache-key:
description: 'Identifier for the Flutter SDK cache'
required: false
default: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
pub-cache-key:
description: 'Identifier for the Dart .pub-cache cache'
required: false
default: 'flutter-pub:os:-:channel:-:version:-:arch:-:hash:'
cache-path:
description: 'Flutter SDK cache path'
required: false
default: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
pub-cache-path:
description: 'Flutter pub cache path'
required: false
default: 'default'
architecture:
description: 'The architecture of Flutter SDK executable (x64 or arm64)'
required: false
default: '${{ runner.arch }}'
outputs:
CACHE-PATH:
value: '${{ steps.flutter-action.outputs.CACHE-PATH }}'
CACHE-KEY:
value: '${{ steps.flutter-action.outputs.CACHE-KEY }}'
CHANNEL:
value: '${{ steps.flutter-action.outputs.CHANNEL }}'
VERSION:
value: '${{ steps.flutter-action.outputs.VERSION }}'
ARCHITECTURE:
value: '${{ steps.flutter-action.outputs.ARCHITECTURE }}'
PUB-CACHE-KEY:
value: '${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}'
PUB-CACHE-PATH:
value: '${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}'
runs:
using: 'node12'
main: 'dist/index.js'
branding:
icon: 'maximize'
color: 'blue'
using: 'composite'
steps:
- run: chmod +x $GITHUB_ACTION_PATH/setup.sh
shell: bash
- id: flutter-action
run: $GITHUB_ACTION_PATH/setup.sh -p -c '${{ inputs.cache-path }}' -k '${{ inputs.cache-key }}' -d '${{ inputs.pub-cache-path }}' -l '${{ inputs.pub-cache-key }}' -n '${{ inputs.flutter-version }}' -a '${{ inputs.architecture }}' ${{ inputs.channel }}
shell: bash
- if: ${{ inputs.cache == 'true' }}
uses: actions/cache@v4
with:
path: ${{ steps.flutter-action.outputs.CACHE-PATH }}
key: ${{ steps.flutter-action.outputs.CACHE-KEY }}
restore-keys: |
${{ steps.flutter-action.outputs.CACHE-KEY }}
- if: ${{ inputs.cache == 'true' }}
uses: actions/cache@v4
with:
path: ${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
key: ${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}-${{ hashFiles('**/pubspec.lock') }}
${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
- run: $GITHUB_ACTION_PATH/setup.sh -c '${{ steps.flutter-action.outputs.CACHE-PATH }}' -n '${{ steps.flutter-action.outputs.VERSION }}' -a '${{ steps.flutter-action.outputs.ARCHITECTURE }}' ${{ steps.flutter-action.outputs.CHANNEL }}
shell: bash

6718
dist/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +0,0 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest'
},
verbose: true
}

6232
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,51 +0,0 @@
{
"name": "flutter-action",
"version": "1.2.0",
"private": true,
"description": "Flutter environment for use in actions",
"main": "lib/index.js",
"scripts": {
"build-tsc": "tsc",
"build-ncc": "ncc build",
"build": "run-s build-tsc build-ncc",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"test": "jest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/subosito/flutter-action.git"
},
"keywords": [
"actions",
"node",
"flutter",
"setup"
],
"author": "Alif Rachmawadi <arch@subosito.com>",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.3",
"@actions/exec": "^1.0.3",
"@actions/http-client": "^1.0.6",
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.3.1",
"semver": "^7.1.3",
"uuid": "^7.0.1"
},
"devDependencies": {
"@types/jest": "^25.1.3",
"@types/nock": "^10.0.3",
"@types/node": "^12.12.29",
"@types/semver": "^7.1.0",
"@types/uuid": "^7.0.0",
"@zeit/ncc": "^0.21.1",
"jest": "^25.1.0",
"jest-circus": "^25.1.0",
"nock": "^10.0.6",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"ts-jest": "^25.2.1",
"typescript": "^3.8.3"
}
}

211
setup.sh Executable file
View File

@@ -0,0 +1,211 @@
#!/bin/bash
check_command() {
command -v "$1" >/dev/null 2>&1
}
if ! check_command jq; then
echo "jq not found, please install it, https://stedolan.github.io/jq/download/"
exit 1
fi
OS_NAME=$(echo "$RUNNER_OS" | awk '{print tolower($0)}')
ARCH_NAME=$(echo "$RUNNER_ARCH" | awk '{print tolower($0)}')
MANIFEST_BASE_URL="https://storage.googleapis.com/flutter_infra_release/releases"
MANIFEST_JSON_PATH="releases_$OS_NAME.json"
MANIFEST_URL="$MANIFEST_BASE_URL/$MANIFEST_JSON_PATH"
filter_by_channel() {
jq --arg channel "$1" '[.releases[] | select($channel == "any" or .channel == $channel)]'
}
filter_by_arch() {
jq --arg arch "$1" '[.[] | select(.dart_sdk_arch == $arch or ($arch == "x64" and (has("dart_sdk_arch") | not)))]'
}
filter_by_version() {
jq --arg version "$1" '.[].version |= gsub("^v"; "") | (if $version == "any" then .[0] else (map(select(.version == $version or (.version | startswith(($version | sub("\\.x$"; "")) + ".")) and .version != $version)) | .[0]) end)'
}
not_found_error() {
echo "Unable to determine Flutter version for channel: $1 version: $2 architecture: $3"
}
transform_path() {
if [[ "$OS_NAME" == windows ]]; then
echo "$1" | sed -e 's/^\///' -e 's/\//\\/g'
else
echo "$1"
fi
}
download_archive() {
archive_url="$MANIFEST_BASE_URL/$1"
archive_name=$(basename "$1")
archive_local="$RUNNER_TEMP/$archive_name"
curl --connect-timeout 15 --retry 5 "$archive_url" >"$archive_local"
mkdir -p "$2"
if [[ "$archive_name" == *zip ]]; then
EXTRACT_PATH="$RUNNER_TEMP/_unzip_temp"
unzip -q -o "$archive_local" -d "$EXTRACT_PATH"
# Remove the folder again so that the move command can do a simple rename
# instead of moving the content into the target folder.
# This is a little bit of a hack since the "mv --no-target-directory"
# linux option is not available here
rm -r "$2"
mv "$EXTRACT_PATH"/flutter "$2"
rm -r "$EXTRACT_PATH"
else
tar xf "$archive_local" -C "$2" --strip-components=1
fi
rm "$archive_local"
}
CACHE_PATH=""
CACHE_KEY=""
PUB_CACHE_PATH=""
PUB_CACHE_KEY=""
PRINT_ONLY=""
TEST_MODE=false
ARCH=""
VERSION=""
while getopts 'tc:k:d:l:pa:n:' flag; do
case "$flag" in
c) CACHE_PATH="$OPTARG" ;;
k) CACHE_KEY="$OPTARG" ;;
d) PUB_CACHE_PATH="$OPTARG" ;;
l) PUB_CACHE_KEY="$OPTARG" ;;
p) PRINT_ONLY=true ;;
t) TEST_MODE=true ;;
a) ARCH="$(echo "$OPTARG" | awk '{print tolower($0)}')" ;;
n) VERSION="$OPTARG" ;;
?) exit 2 ;;
esac
done
[[ -z $ARCH ]] && ARCH="$ARCH_NAME"
ARR_CHANNEL=("${@:$OPTIND:1}")
CHANNEL="${ARR_CHANNEL[0]}"
[[ -z $CHANNEL ]] && CHANNEL=stable
[[ -z $VERSION ]] && VERSION=any
[[ -z $ARCH ]] && ARCH=x64
[[ -z $CACHE_PATH ]] && CACHE_PATH="$RUNNER_TEMP/flutter/:channel:-:version:-:arch:"
[[ -z $CACHE_KEY ]] && CACHE_KEY="flutter-:os:-:channel:-:version:-:arch:-:hash:"
[[ -z $PUB_CACHE_KEY ]] && PUB_CACHE_KEY="flutter-pub-:os:-:channel:-:version:-:arch:-:hash:"
[[ -z $PUB_CACHE_PATH ]] && PUB_CACHE_PATH="default"
# `PUB_CACHE` is what Dart and Flutter looks for in the environment, while
# `PUB_CACHE_PATH` is passed in from the action.
#
# If `PUB_CACHE` is set already, then it should continue to be used. Otherwise, satisfy it
# if the action requests a custom path, or set to the Dart default values depending
# on the operating system.
if [ -z "$PUB_CACHE" ]; then
if [ "$PUB_CACHE_PATH" != "default" ]; then
PUB_CACHE="$PUB_CACHE_PATH"
elif [ "$OS_NAME" == "windows" ]; then
PUB_CACHE="$LOCALAPPDATA\\Pub\\Cache"
else
PUB_CACHE="$HOME/.pub-cache"
fi
fi
if [[ "$TEST_MODE" == true ]]; then
RELEASE_MANIFEST=$(cat "$(dirname -- "${BASH_SOURCE[0]}")/test/$MANIFEST_JSON_PATH")
else
RELEASE_MANIFEST=$(curl --silent --connect-timeout 15 --retry 5 "$MANIFEST_URL")
fi
if [[ "$CHANNEL" == "master" || "$CHANNEL" == "main" ]]; then
VERSION_MANIFEST="{\"channel\":\"$CHANNEL\",\"version\":\"$VERSION\",\"dart_sdk_arch\":\"$ARCH\",\"hash\":\"$CHANNEL\",\"sha256\":\"$CHANNEL\"}"
else
VERSION_MANIFEST=$(echo "$RELEASE_MANIFEST" | filter_by_channel "$CHANNEL" | filter_by_arch "$ARCH" | filter_by_version "$VERSION")
fi
if [[ "$VERSION_MANIFEST" == *null* ]]; then
not_found_error "$CHANNEL" "$VERSION" "$ARCH"
exit 1
fi
expand_key() {
version_channel=$(echo "$VERSION_MANIFEST" | jq -r '.channel')
version_version=$(echo "$VERSION_MANIFEST" | jq -r '.version')
version_arch=$(echo "$VERSION_MANIFEST" | jq -r '.dart_sdk_arch // "x64"')
version_hash=$(echo "$VERSION_MANIFEST" | jq -r '.hash')
version_sha_256=$(echo "$VERSION_MANIFEST" | jq -r '.sha256')
expanded_key="${1/:channel:/$version_channel}"
expanded_key="${expanded_key/:version:/$version_version}"
expanded_key="${expanded_key/:arch:/$version_arch}"
expanded_key="${expanded_key/:hash:/$version_hash}"
expanded_key="${expanded_key/:sha256:/$version_sha_256}"
expanded_key="${expanded_key/:os:/$OS_NAME}"
echo "$expanded_key"
}
CACHE_KEY=$(expand_key "$CACHE_KEY")
PUB_CACHE_KEY=$(expand_key "$PUB_CACHE_KEY")
CACHE_PATH=$(expand_key "$(transform_path "$CACHE_PATH")")
if [[ "$PRINT_ONLY" == true ]]; then
version_info=$(echo "$VERSION_MANIFEST" | jq -j '.channel,":",.version,":",.dart_sdk_arch // "x64"')
info_channel=$(echo "$version_info" | awk -F ':' '{print $1}')
info_version=$(echo "$version_info" | awk -F ':' '{print $2}')
info_architecture=$(echo "$version_info" | awk -F ':' '{print $3}')
if [[ "$TEST_MODE" == true ]]; then
echo "CHANNEL=$info_channel"
echo "VERSION=$info_version"
echo "ARCHITECTURE=$info_architecture"
echo "CACHE-KEY=$CACHE_KEY"
echo "CACHE-PATH=$CACHE_PATH"
echo "PUB-CACHE-KEY=$PUB_CACHE_KEY"
echo "PUB-CACHE-PATH=$PUB_CACHE"
exit 0
fi
{
echo "CHANNEL=$info_channel"
echo "VERSION=$info_version"
echo "ARCHITECTURE=$info_architecture"
echo "CACHE-KEY=$CACHE_KEY"
echo "CACHE-PATH=$CACHE_PATH"
echo "PUB-CACHE-KEY=$PUB_CACHE_KEY"
echo "PUB-CACHE-PATH=$PUB_CACHE"
} >>"$GITHUB_OUTPUT"
exit 0
fi
if [[ ! -x "$CACHE_PATH/bin/flutter" ]]; then
if [[ "$CHANNEL" == "master" || "$CHANNEL" == "main" ]]; then
git clone -b "$CHANNEL" https://github.com/flutter/flutter.git "$CACHE_PATH"
if [[ "$VERSION" != "any" ]]; then
git config --global --add safe.directory "$CACHE_PATH"
(cd "$CACHE_PATH" && git checkout "$VERSION")
fi
else
archive_url=$(echo "$VERSION_MANIFEST" | jq -r '.archive')
download_archive "$archive_url" "$CACHE_PATH"
fi
fi
{
echo "FLUTTER_ROOT=$CACHE_PATH"
echo "PUB_CACHE=$PUB_CACHE"
} >>"$GITHUB_ENV"
{
echo "$CACHE_PATH/bin"
echo "$CACHE_PATH/bin/cache/dart-sdk/bin"
echo "$PUB_CACHE/bin"
} >>"$GITHUB_PATH"

View File

@@ -1,15 +0,0 @@
import * as core from '@actions/core';
import * as installer from './installer';
async function run() {
try {
const version = core.getInput('flutter-version') || '';
const channel = core.getInput('channel') || 'stable';
await installer.getFlutter(version, channel);
} catch (error) {
core.setFailed(error.message);
}
}
run();

View File

@@ -1,211 +0,0 @@
import * as core from '@actions/core';
import * as io from '@actions/io';
import * as tc from '@actions/tool-cache';
import * as fs from 'fs';
import * as path from 'path';
import * as httpm from '@actions/http-client';
import * as semver from 'semver';
const IS_WINDOWS = process.platform === 'win32';
const IS_DARWIN = process.platform === 'darwin';
const IS_LINUX = process.platform === 'linux';
const storageUrl = 'https://storage.googleapis.com/flutter_infra/releases';
let tempDirectory = process.env['RUNNER_TEMP'] || '';
if (!tempDirectory) {
let baseLocation;
if (IS_WINDOWS) {
baseLocation = process.env['USERPROFILE'] || 'C:\\';
} else {
if (process.platform === 'darwin') {
baseLocation = '/Users';
} else {
baseLocation = '/home';
}
}
tempDirectory = path.join(baseLocation, 'actions', 'temp');
}
export async function getFlutter(
version: string,
channel: string
): Promise<void> {
const versionPart = version.split('.');
if (versionPart[1] == null || versionPart[2] == null) {
version = version.concat('.x');
}
version = await determineVersion(version, channel);
let cleanver = `${version.replace('+', '-')}-${channel}`;
let toolPath = tc.find('flutter', cleanver);
if (toolPath) {
core.debug(`Tool found in cache ${toolPath}`);
} else {
core.debug('Downloading Flutter from Google storage');
const downloadInfo = getDownloadInfo(version, channel);
const sdkFile = await tc.downloadTool(downloadInfo.url);
let tempDir: string = generateTempDir();
const sdkDir = await extractDownload(sdkFile, tempDir);
core.debug(`Flutter sdk extracted to ${sdkDir}`);
toolPath = await tc.cacheDir(sdkDir, 'flutter', cleanver);
}
core.exportVariable('FLUTTER_HOME', toolPath);
core.addPath(path.join(toolPath, 'bin'));
}
function osName(): string {
if (IS_DARWIN) return 'macos';
if (IS_WINDOWS) return 'windows';
return process.platform;
}
function extName(): string {
if (IS_LINUX) return 'tar.xz';
return 'zip';
}
function getDownloadInfo(
version: string,
channel: string
): {version: string; url: string} {
const os = osName();
const ext = extName();
const url = `${storageUrl}/${channel}/${os}/flutter_${os}_v${version}-${channel}.${ext}`;
return {
version,
url
};
}
function generateTempDir(): string {
return path.join(
tempDirectory,
'temp_' + Math.floor(Math.random() * 2000000000)
);
}
async function extractDownload(
sdkFile: string,
destDir: string
): Promise<string> {
await io.mkdirP(destDir);
const sdkPath = path.normalize(sdkFile);
const stats = fs.statSync(sdkPath);
if (stats.isFile()) {
await extractFile(sdkFile, destDir);
const sdkDir = path.join(destDir, fs.readdirSync(destDir)[0]);
return sdkDir;
} else {
throw new Error(`Flutter sdk argument ${sdkFile} is not a file`);
}
}
async function extractFile(file: string, destDir: string): Promise<void> {
const stats = fs.statSync(file);
if (!stats) {
throw new Error(`Failed to extract ${file} - it doesn't exist`);
} else if (stats.isDirectory()) {
throw new Error(`Failed to extract ${file} - it is a directory`);
}
if ('tar.xz' === extName()) {
await tc.extractTar(file, destDir, 'x');
} else {
await tc.extractZip(file, destDir);
}
}
async function determineVersion(
version: string,
channel: string
): Promise<string> {
if (version.endsWith('.x') || version === '') {
return await getLatestVersion(version, channel);
}
return version;
}
interface IFlutterChannel {
[key: string]: string;
beta: string;
dev: string;
stable: string;
}
interface IFlutterRelease {
hash: string;
channel: string;
version: string;
}
interface IFlutterStorage {
current_release: IFlutterChannel;
releases: IFlutterRelease[];
}
async function getLatestVersion(
version: string,
channel: string
): Promise<string> {
const releasesUrl: string = `${storageUrl}/releases_${osName()}.json`;
const http: httpm.HttpClient = new httpm.HttpClient('flutter-action');
const storage: IFlutterStorage | null = (
await http.getJson<IFlutterStorage | null>(releasesUrl)
).result;
if (!storage) {
throw new Error('unable to get latest version');
}
if (version.endsWith('.x')) {
const sver = version.slice(0, version.length - 2);
const releases = storage.releases.filter(
release =>
release.version.startsWith(`v${sver}`) && release.channel === channel
);
const versions = releases.map(release =>
release.version.slice(1, release.version.length)
);
const sortedVersions = versions.sort(semver.rcompare);
core.debug(
`latest version of ${version} from channel ${channel} is ${sortedVersions[0]}`
);
return sortedVersions[0];
}
const channelVersion = storage.releases.find(
release => release.hash === storage.current_release[channel]
);
if (!channelVersion) {
throw new Error(`unable to get latest version from channel ${channel}`);
}
let cver = channelVersion.version;
cver = cver.slice(1, cver.length);
core.debug(`latest version from channel ${channel} is ${cver}`);
return cver;
}

4414
test/releases_linux.json Normal file

File diff suppressed because it is too large Load Diff

4896
test/releases_macos.json Normal file

File diff suppressed because it is too large Load Diff

4414
test/releases_windows.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +0,0 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"outDir": "./lib",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true
},
"exclude": ["node_modules", "**/*.test.ts"]
}