You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure that `npm test` passes. A pre-commit hook is available: `git config core.hooksPath .tools/hooks`.
16
+
17
+
## CI
18
+
19
+
Continuous testing runs on GitHub Actions. Make sure that _.github/workflows/main.yml_ and _release.yml_ stay in sync, other than the differences that they already have.
20
+
21
+
## Cutting a release
22
+
23
+
Switch to _master_ branch, in a clean state. Run `.tools/release.sh x.y.z` (an actual next version number). You will be switched to the _v1_ branch, _node_modules_ will be populated, and a tag will be created. The final command to push all this will be only printed. Run it. After this, a release also needs to be published on GitHub Marketplace.
24
+
25
+
### _node_modules_
26
+
27
+
The _node_modules_ directory must not be present in the _master_ branch. _package-lock.json_ will be present, though.
[GitHub Action][] to **install [Crystal][] programming language**
4
+
[GitHub Action][] to **install [Crystal][] programming language** and [Shards][] package manager.
5
5
6
6
Works on Ubuntu, macOS, Windows.
7
7
8
-
On Ubuntu and macOS this also installs `shards`. This will be expanded in the future.
9
-
10
8
## Examples
11
9
12
10
```yaml
@@ -20,37 +18,80 @@ steps:
20
18
- uses: actions/checkout@v2
21
19
- uses: oprypin/install-crystal@v1
22
20
with:
23
-
crystal: 0.34.0
21
+
crystal: 0.35.1
22
+
- run: shards install
24
23
- run: crystal spec
25
24
```
26
25
26
+
```yaml
27
+
strategy:
28
+
fail-fast: false
29
+
matrix:
30
+
include:
31
+
- {os: ubuntu-latest, crystal: latest}
32
+
- {os: ubuntu-latest, crystal: nightly}
33
+
- {os: macos-latest}
34
+
- {os: windows-latest}
35
+
runs-on: ${{matrix.os}}
36
+
steps:
37
+
- uses: oprypin/install-crystal@v1
38
+
with:
39
+
crystal: ${{matrix.crystal}}
40
+
- uses: actions/checkout@v2
41
+
- run: shards install
42
+
- run: crystal spec
43
+
- run: crystal tool format --check
44
+
if: matrix.crystal == 'latest'
45
+
```
46
+
27
47
[Find usages in the wild!](https://github.com/search?l=YAML&q=%22oprypin%2Finstall-crystal%22&type=Code)
28
48
29
-
Alternatively, you can use the container-based approach [as in the starter workflow][crystal-starter] (without this action), but the advantage here is the unified approach to installation across 3 systems.
49
+
Alternatively, you can use the container-based approach [as in the starter workflow][crystal-starter] (without this action), but the advantage here is the unified approach to installation across 3 systems. [Using a custom container has disadvantages on its own, too](https://forum.crystal-lang.org/t//2837).
30
50
31
51
## Usage
32
52
33
53
### Inputs
34
54
35
-
* **`crystal: 0.34.0`** (not supported on Windows)
55
+
* * **`crystal: 0.35.1`** (not supported on Windows)
56
+
57
+
Install a particular release of Crystal.
58
+
59
+
* **`crystal: latest`** (default; not supported on Windows)
60
+
61
+
Install the latest released version of Crystal.
62
+
63
+
* **`crystal: nightly`** (default on Windows)
64
+
65
+
Install Crystal from the latest continuous build on [crystal.git][] master.
36
66
37
-
Install a particular release of Crystal.
67
+
* * **`shards: true`** (default)
38
68
39
-
* **`crystal: latest`** (default; not supported on Windows)
69
+
Ensure that *some* released version of [Shards][] is available.
70
+
This uses the build that's bundled with Crystal's releases. Other options are slower, as building Shards is a necessary step then.
40
71
41
-
Install the latest released version of Crystal.
72
+
* **`shards: false`**
42
73
43
-
* **`crystal: nightly`** (default on Windows)
74
+
Ensure that `shards` executable is *not* available.
44
75
45
-
Install Crystal from the latest continuous build on [crystal.git][] master.
76
+
* **`shards: latest`**
77
+
78
+
Build and install the latest released version of Shards.
79
+
80
+
* **`shards: 0.13.0`**
81
+
82
+
Build and install a particular release of Shards.
83
+
84
+
* **`shards: nightly`**
85
+
86
+
Build and install the latest commit of [shards.git][] master.
46
87
47
88
* **`arch: x86_64`**, **`arch: x86`** (defaults to current OS arch)
48
89
49
90
The architecture of the build of Crystal to download.
50
91
51
92
* **`destination: some/path`**
52
93
53
-
The directory to store Crystal in, after extracting.
94
+
The directory to store Crystal in, after extracting. Will directly affect `outputs.path` (the default is in a temporary location).
54
95
55
96
* **`token: ${{ github.token }}`**
56
97
@@ -62,8 +103,17 @@ Alternatively, you can use the container-based approach [as in the starter workf
62
103
63
104
The actual version of Crystal (as a ref in crystal-lang/[crystal.git][]) that was installed.
0 commit comments