add commit hash syntax to readme

This commit is contained in:
Renée Kooi 2020-11-11 12:17:26 +01:00
parent 96923a5a7f
commit a43b52f8f8
No known key found for this signature in database
GPG Key ID: 9940E33D1A44ADBF

View File

@ -1,6 +1,6 @@
# setup-zig # setup-zig
Use the zig compiler in your Github Action Use the zig compiler in your Github Actions workflows
[Usage](#usage) - [License: Apache-2.0](#license) [Usage](#usage) - [License: Apache-2.0](#license)
@ -41,7 +41,14 @@ To use the nightly builds, set:
version: master version: master
``` ```
If you are running Zig on Windows machines, you need to make sure that your .zig files use \n line endings and not \r\n. The `actions/checkout` action auto-converts line endings to \r\n, so add a `.gitattributes` file: Or [pin to a specific commit](https://github.com/goto-bus-stop/setup-zig/issues/13) using `version+commithash` syntax:
```yaml
- uses: goto-bus-stop/setup-zig@v1
with:
version: 0.6.0+4b48fccad
```
If you are running Zig on Windows machines, you need to make sure that your .zig files use \n line endings and not \r\n. The `actions/checkout` action auto-converts line endings to `\r\n` on Windows runners, so add a `.gitattributes` file:
``` ```
*.zig text eol=lf *.zig text eol=lf
``` ```