diff --git a/README.md b/README.md index 065b413436..cc21b962db 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Feel free to report issues here on GitHub or to ask for questions on our :speech The easiest way to try out Dafny is to [install Dafny on your own machine in Visual Studio Code](https://github.com/dafny-lang/dafny/wiki/INSTALL#visual-studio-code) and follow along with the [Dafny tutorial](https://dafny-lang.github.io/dafny/OnlineTutorial/guide). You can also [download and install](https://github.com/dafny-lang/dafny/wiki/INSTALL#install-the-binaries) the Dafny CLI if you prefer to work from the command line. +For CI/CD integration, see [DafnySetupCI](docs/DafnySetupCI.md) for GitHub Actions setup. ## Read more diff --git a/docs/DafnySetupCI.md b/docs/DafnySetupCI.md new file mode 100644 index 0000000000..ebdb551514 --- /dev/null +++ b/docs/DafnySetupCI.md @@ -0,0 +1,40 @@ +# Using Dafny in GitHub Actions + +Use the [setup-dafny-action](https://github.com/dafny-lang/setup-dafny-action) to install Dafny in your CI workflows. + +## Basic Setup + +```yaml +- name: "Install Dafny" + uses: dafny-lang/setup-dafny-action@v1 +``` + +## Specific Version + +```yaml +- name: "Install Dafny" + uses: dafny-lang/setup-dafny-action@v1 + with: + dafny-version: "4.9.1" +``` + +## Nightly Build + +```yaml +- name: "Install Dafny" + uses: dafny-lang/setup-dafny-action@v1 + with: + dafny-version: "nightly-latest" +``` + +## Build from Source + +```yaml +- name: "Install Dafny" + uses: dafny-lang/setup-dafny-action@v1 + with: + dafny-version: "4.9.1" + build-from-source: "branch-name" +``` + +The action sets `DAFNY_VERSION` environment variable and works on all platforms including macOS. \ No newline at end of file