From 3fdd5f413139d6bb72c43eb9c1b7329d0c7da483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Sat, 5 Oct 2019 13:16:38 +0200 Subject: [PATCH] Update readme --- README.md | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 21d7c57..9a59395 100644 --- a/README.md +++ b/README.md @@ -2,29 +2,35 @@ Use the zig compiler in your Github Action -[Install](#install) - [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) - [License: Apache-2.0](#license) ## Usage -```js -var setupZig = require('setup-zig') +In a Github Actions workflow file, do something like: + +```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