File tree Expand file tree Collapse file tree 5 files changed +15
-9
lines changed Expand file tree Collapse file tree 5 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1+ # 0.3.1
2+
3+ - moon can be forced installed by setting ` moon-version ` , instead of relying on file detection.
4+
15# 0.3.0
26
37- Now includes the moon and proto versions in the cache key.
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ A GitHub action that sets up an environment for proto and moon.
44
55- Installs ` proto ` globally so that installed tools can also be executed globally.
66- Conditionally installs ` moon ` globally if the repository is using moon (attempts to detect a
7- ` .moon ` directory).
7+ ` .moon ` directory), or ` moon-version ` is set .
88- Caches the toolchain (` ~/.proto ` ) so subsequent runs are faster.
99- Hashes ` .prototools ` and ` .moon/toolchain.yml ` files to generate a unique cache key.
1010- Cleans the toolchain before caching to remove unused or stale tools.
3333- ` cache` - Toggle caching of the toolchain directory. Defaults to `true`.
3434- ` cache-base` - Base branch/ref to save a warmup cache on. Other branches/refs will restore from
3535 this base.
36- - ` moon-version` - Version of moon to explicitly install (if repository is using moon). Defaults to
37- " latest" .
38- - ` proto-version` - Version of proto to explicitly install. Defaults to "latest".
36+ - ` moon-version` - Version of moon to explicitly install.
37+ - ` proto-version` - Version of proto to explicitly install.
3938- ` workspace-root` - Relative path to moon's workspace root if initialized in a sub-directory.
4039 Defaults to "".
Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ inputs:
1212 description :
1313 ' Base branch/ref to save a warmup cache on. Other branches/refs will restore from this base.'
1414 moon-version :
15- default : ' latest '
16- description : ' Version of moon to install (if repository is using moon) .'
15+ default : ' '
16+ description : ' Version of moon to install.'
1717 required : false
1818 proto-version :
19- default : ' latest '
19+ default : ' '
2020 description : ' Version of proto to install.'
2121 required : false
2222 workspace-root :
Original file line number Diff line number Diff line change @@ -51,7 +51,10 @@ export function isCacheEnabled() {
5151}
5252
5353export function isUsingMoon ( ) {
54- return fs . existsSync ( path . join ( getWorkingDir ( ) , core . getInput ( 'workspace-root' ) , '.moon' ) ) ;
54+ return (
55+ ! ! core . getInput ( 'moon-version' ) ||
56+ fs . existsSync ( path . join ( getWorkingDir ( ) , core . getInput ( 'workspace-root' ) , '.moon' ) )
57+ ) ;
5558}
5659
5760export function extractMajorMinor ( version : string ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " @moonrepo/setup-toolchain" ,
3- "version" : " 0.3.0 " ,
3+ "version" : " 0.3.1 " ,
44 "description" : " A GitHub action to setup and cache the proto and moon toolchains." ,
55 "main" : " dist/index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments