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
Copy file name to clipboardExpand all lines: README.md
+24-11Lines changed: 24 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ A GitHub Action which sets up a PureScript toolchain for CI. Contains the follow
5
5
- The [PureScript compiler](https://github.com/purescript/purescript)
6
6
- The [Spago package manager and build tool](https://github.com/purescript/spago)
7
7
- The [Zephyr dead code elimination tool](https://github.com/coot/zephyr)
8
+
- The [Purty source code formatter](https://gitlab.com/joneshf/purty)
8
9
9
10
This action is designed to support tools with static binaries. Your PureScript project may also depend on tooling and libraries provided by the NPM ecosystem, in which case you will also want to use the [setup-node](https://github.com/actions/setup-node) action.
10
11
@@ -16,7 +17,7 @@ See the [action.yml](action.yml) file for all possible inputs and outputs.
16
17
17
18
### Basic
18
19
19
-
Get the latest versions of PureScript, Spago, and Zephyr in the environment:
20
+
Use the PureScript toolchain with the latest version of each tool (resolved from GitHub releases or the latest tag with a valid semantic version):
20
21
21
22
```yaml
22
23
steps:
@@ -27,7 +28,7 @@ steps:
27
28
28
29
### Use Specific Versions
29
30
30
-
Use specific versions of any tool by supplying a valid semantic version (only exact versions currently supported):
31
+
Use a specific version of any tool by supplying a valid semantic version (only exact versions currently supported):
31
32
32
33
```yaml
33
34
steps:
@@ -36,19 +37,31 @@ steps:
36
37
with:
37
38
purescript-version: "0.13.8"
38
39
spago-version: "0.15.3"
40
+
purty-version: "6.2.0"
39
41
zephyr-version: "0.3.2"
40
42
- run: spago build
41
43
```
42
44
43
-
### Cache Library Dependencies (Coming Soon)
45
+
## Development
44
46
45
-
Automatically build and cache library dependencies between workflow runs by supplying a path to a Spago config file:
47
+
Enter a development shell with necessary tools installed:
46
48
47
-
```yaml
48
-
steps:
49
-
- uses: actions/checkout@v2
50
-
- uses: thomashoneyman/setup-purescript@master
51
-
with:
52
-
cache: "spago.dhall"
53
-
- run: spago build
49
+
```sh
50
+
nix-shell
51
+
```
52
+
53
+
If you need any additional tools not included in this Nix expression or available via NPM, please feel free to add them via [easy-purescript-nix](https://github.com/justinwoo/easy-purescript-nix).
54
+
55
+
Next, install NPM dependencies:
56
+
57
+
```sh
58
+
npm install
54
59
```
60
+
61
+
GitHub Actions uses the `action.yml` file to define the action and the `dist/index.js` file to execute it. After making any changes to the source code, make sure those changes are visible by running:
62
+
63
+
```sh
64
+
npm run package
65
+
```
66
+
67
+
This will bundle and minify the source code so it is available to the end user.
0 commit comments