Update readme

This commit is contained in:
Renée Kooi 2019-10-05 13:16:38 +02:00
parent 7c115798dd
commit 3fdd5f4131
No known key found for this signature in database
GPG Key ID: 497533BAECCD642A

View File

@ -2,29 +2,35 @@
Use the zig compiler in your Github Action Use the zig compiler in your Github Action
[Install](#install) - [Usage](#usage) - [License: Apache-2.0](#license) [Usage](#usage) - [License: Apache-2.0](#license)
[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![standard][standard-image]][standard-url]
[npm-image]: https://img.shields.io/npm/v/setup-zig.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/setup-zig
[travis-image]: https://img.shields.io/travis/goto-bus-stop/setup-zig.svg?style=flat-square
[travis-url]: https://travis-ci.org/goto-bus-stop/setup-zig
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard
## Install
```
npm install setup-zig
```
## Usage ## Usage
```js In a Github Actions workflow file, do something like:
var setupZig = require('setup-zig')
```yaml
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v1
- uses: goto-bus-stop/setup-zig@v1.0.0
- run: zig build test
```
Optionally set a Zig version:
```yaml
- uses: goto-bus-stop/setup-zig@v1.0.0
with:
version: 0.4.0 # The default is 0.5.0
```
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:
```
*.zig text eol=lf
``` ```
## License ## License