Skip to content

Commit 392d165

Browse files
committed
Merge branch 'master' into v1
2 parents f0b2ce0 + ad6ec62 commit 392d165

18 files changed

+2486
-356
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"es6": true,
55
"node": true
66
},
7+
"ignorePatterns": ["docs/", "site/"],
78
"extends": "eslint:recommended",
89
"globals": {
910
"Atomics": "readonly",

.github/workflows/deploy-docs.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy docs
2+
on:
3+
push:
4+
paths: ['docs/**', '*.md']
5+
pull_request:
6+
paths: ['docs/**', '*.md']
7+
branches: [master]
8+
schedule:
9+
- cron: '0 6 * * 6'
10+
jobs:
11+
build:
12+
name: Deploy docs
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Download source
16+
uses: actions/checkout@v2
17+
- name: Install Python
18+
uses: actions/setup-python@v2
19+
- name: Install dependencies
20+
run: pip install -r docs/requirements.txt
21+
- name: Fetch branch
22+
run: git fetch origin v1:v1
23+
- name: Build site
24+
run: mkdocs build
25+
working-directory: docs
26+
- name: Deploy to gh-pages
27+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
28+
uses: oprypin/push-to-gh-pages@v3
29+
with:
30+
publish_dir: site
31+
commit_message: 'Generate docs: '

.github/workflows/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ name: CI
22

33
on:
44
push:
5+
paths-ignore: ['docs/**', '*.md']
56
pull_request:
6-
7+
paths-ignore: ['docs/**', '*.md']
8+
branches: [master]
79
schedule:
810
- cron: '0 6 * * 6'
911

@@ -86,4 +88,4 @@ jobs:
8688
- uses: actions/checkout@v2
8789
- run: npm install
8890
- run: npm test
89-
- run: npm audit --audit-level=moderate
91+
- run: npm audit --audit-level=moderate --only=prod

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ name: CI (release)
22

33
on:
44
push:
5-
branches:
6-
- v1
5+
branches: [v1]
6+
7+
8+
79
schedule:
810
- cron: '0 6 * * 6'
911

@@ -34,7 +36,7 @@ jobs:
3436
steps:
3537
- uses: actions/checkout@v2
3638
- run: npm install --only=prod
37-
- uses: oprypin/install-crystal@v1
39+
- uses: crystal-lang/install-crystal@v1
3840
with: ${{ matrix.config }}
3941
id: install
4042
- run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
22
.vscode/
3+
site/

.tools/upgrade.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ cd "$(dirname "$0")/.."
77
rm -f package-lock.json
88

99
ncu -u
10-
npm install
10+
npm update
1111
npm test
1212
git commit -a -m "Upgrade packages"

README.md

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@ install-crystal
55

66
Works on Ubuntu, macOS, Windows.
77

8+
### Quickstart
9+
10+
**[Configurator][]**: get a pre-made config for your exact use case!
11+
812
## Examples
913

1014
```yaml
1115
steps:
12-
- uses: oprypin/install-crystal@v1
16+
- uses: crystal-lang/install-crystal@v1
1317
- run: crystal eval "puts 1337"
1418
```
1519
1620
```yaml
1721
steps:
1822
- uses: actions/checkout@v2
19-
- uses: oprypin/install-crystal@v1
23+
- uses: crystal-lang/install-crystal@v1
2024
with:
2125
crystal: 0.35.1
2226
- run: shards install
@@ -34,13 +38,13 @@ steps:
3438
- {os: windows-latest}
3539
runs-on: ${{matrix.os}}
3640
steps:
37-
- uses: oprypin/install-crystal@v1
41+
- uses: crystal-lang/install-crystal@v1
3842
with:
3943
crystal: ${{matrix.crystal}}
4044
- uses: actions/checkout@v2
4145
- run: shards install
4246
- run: crystal spec
43-
- run: crystal tool format --check
47+
- run: crystal tool format && git diff --exit-code
4448
if: matrix.crystal == 'latest'
4549
```
4650
@@ -52,68 +56,69 @@ Alternatively, you can use the container-based approach [as in the starter workf
5256
5357
### Inputs
5458
55-
* * **`crystal: 0.35.1`** (not supported on Windows)
59+
* * **`crystal: 0.35.1`** (not supported on Windows)
5660

57-
Install a particular release of Crystal.
61+
Install a particular release of Crystal.
5862

59-
* **`crystal: latest`** (default; not supported on Windows)
63+
* **`crystal: latest`** (default; not supported on Windows)
6064

61-
Install the latest released version of Crystal.
65+
Install the latest released version of Crystal.
6266

63-
* **`crystal: nightly`** (default on Windows)
67+
* **`crystal: nightly`** (default on Windows)
6468

65-
Install Crystal from the latest continuous build on [crystal.git][] master.
69+
Install Crystal from the latest continuous build on [crystal.git][] master.
6670

67-
* * **`shards: true`** (default)
71+
* * **`shards: true`** (default)
6872

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.
73+
Ensure that *some* released version of [Shards][] is available.
74+
This uses the build that's bundled with Crystal's releases. Other options are slower, as building Shards is a necessary step then.
7175

72-
* **`shards: false`**
76+
* **`shards: false`**
7377

74-
Ensure that `shards` executable is *not* available.
78+
Ensure that `shards` executable is *not* available.
7579

76-
* **`shards: latest`**
80+
* **`shards: latest`**
7781

78-
Build and install the latest released version of Shards.
82+
Build and install the latest released version of Shards.
7983

80-
* **`shards: 0.13.0`**
84+
* **`shards: 0.13.0`**
8185

82-
Build and install a particular release of Shards.
86+
Build and install a particular release of Shards.
8387

84-
* **`shards: nightly`**
88+
* **`shards: nightly`**
8589

86-
Build and install the latest commit of [shards.git][] master.
90+
Build and install the latest commit of [shards.git][] master.
8791

88-
* **`arch: x86_64`**, **`arch: x86`** (defaults to current OS arch)
92+
* **`arch: x86_64`**, **`arch: x86`** (defaults to current OS arch)
8993

90-
The architecture of the build of Crystal to download.
94+
The architecture of the build of Crystal to download.
9195

92-
* **`destination: some/path`**
96+
* **`destination: some/path`**
9397

94-
The directory to store Crystal in, after extracting. Will directly affect `outputs.path` (the default is in a temporary location).
98+
The directory to store Crystal in, after extracting. Will directly affect `outputs.path` (the default is in a temporary location).
9599

96-
* **`token: ${{ github.token }}`**
100+
* **`token: ${{ github.token }}`**
97101

98-
Personal access token (auto-populated).
102+
Personal access token (auto-populated).
99103

100104
### Outputs
101105

102-
* **`crystal`** (`${{ steps.some_step_id.outputs.crystal }}`)
106+
* **`crystal`** (`${{ steps.some_step_id.outputs.crystal }}`)
103107

104-
The actual version of Crystal (as a ref in crystal-lang/[crystal.git][]) that was installed.
108+
The actual version of Crystal (as a ref in crystal-lang/[crystal.git][]) that was installed.
105109

106-
* **`shards`** (`${{ steps.some_step_id.outputs.shards }}`)
110+
* **`shards`** (`${{ steps.some_step_id.outputs.shards }}`)
107111

108-
The actual version of Shards (as a ref in crystal-lang/[shards.git][]) that was installed.
112+
The actual version of Shards (as a ref in crystal-lang/[shards.git][]) that was installed.
109113

110-
* **`path`** (`${{ steps.some_step_id.outputs.path }}`)
114+
* **`path`** (`${{ steps.some_step_id.outputs.path }}`)
111115

112-
The path where Crystal was extracted to, so you can use '[path]/bin/crystal', '[path]/src' etc.
116+
The path where Crystal was extracted to, so you can use '[path]/bin/crystal', '[path]/src' etc.
113117

114118
[github action]: https://github.com/features/actions
115119
[crystal]: https://crystal-lang.org/
116120
[crystal.git]: https://github.com/crystal-lang/crystal
117121
[shards]: https://github.com/crystal-lang/shards
118122
[shards.git]: https://github.com/crystal-lang/shards
119123
[crystal-starter]: https://github.com/actions/starter-workflows/blob/master/ci/crystal.yml
124+
[configurator]: https://crystal-lang.github.io/install-crystal/configurator.html

docs/assets/script.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hljs.initHighlighting();

docs/assets/style.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.hljs-string, .hljs-literal, .hljs-number {
2+
color: var(--md-code-hl-string-color);
3+
}
4+
.hljs-comment {
5+
color: var(--md-code-hl-comment-color);
6+
}
7+
.hljs-bullet {
8+
margin-top: 0.4em !important;
9+
display: inline-block;
10+
}
11+
.hljs-attr + .hljs-bullet {
12+
display: inline;
13+
}
14+
pre {
15+
line-height: 1.5 !important;
16+
}
17+
18+
.configurator {
19+
line-height: 2;
20+
}
21+
.configurator hr {
22+
margin: 0.5em 0 !important;
23+
}
24+
25+
h1 {
26+
color: var(--md-default-fg-color) !important;
27+
}
28+
.configurator input {
29+
vertical-align: text-top;
30+
}
31+
input + label {
32+
cursor: pointer;
33+
}
34+
35+
.configurator input:not(:checked) + label {
36+
opacity: 0.85;
37+
}
38+
.configurator label {
39+
text-decoration: underline;
40+
text-decoration-color: var(--md-default-fg-color--light);
41+
}
42+
.configurator input:not(:checked) + label {
43+
text-decoration: none;
44+
}

0 commit comments

Comments
 (0)