aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/test.yml31
-rw-r--r--README.md6
-rw-r--r--bin/download-compiler10
3 files changed, 13 insertions, 34 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 64dcff9..aa9a2e7 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -14,36 +14,9 @@ jobs:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
- otp-version: "26.0.2"
- gleam-version: "0.34.0"
- rebar3-version: "3"
- # elixir-version: "1.15.4"
+ gleam-version: "0.34.1"
- run: gleam deps download
- run: gleam format --check src test
- run: gleam test
-
- - run: |
- mkdir wasm-compiler
- cd wasm-compiler
- curl -L "https://github.com/gleam-lang/gleam/releases/download/v0.34.1/gleam-v0.34.1-browser.tar.gz" | tar xz
- cd ..
-
+ - run: ./bin/download-compiler
- run: gleam run
-
- # Deploy to GitHub pages.
- # These steps only run for the main branch, each has an `if`.
-
- - name: Setup Pages
- uses: actions/configure-pages@v4
- if: github.ref == 'refs/heads/main'
-
- - name: Upload artifact
- uses: actions/upload-pages-artifact@v3
- with:
- path: 'public'
- if: github.ref == 'refs/heads/main'
-
- - name: Deploy to GitHub Pages
- id: deployment
- uses: actions/deploy-pages@v4
- if: github.ref == 'refs/heads/main'
diff --git a/README.md b/README.md
index 96b97dc..45b5b93 100644
--- a/README.md
+++ b/README.md
@@ -4,11 +4,7 @@ An interactive tour of the Gleam programming language.
```sh
# Download a wasm version of the Gleam compiler
-rm -rf wasm-compiler
-mkdir wasm-compiler
-cd wasm-compiler
-curl -L "https://github.com/gleam-lang/gleam/releases/download/v0.34.1/gleam-v0.34.1-browser.tar.gz" | tar xz
-cd ..
+./bin/download-compiler
# Build the site
gleam run
diff --git a/bin/download-compiler b/bin/download-compiler
new file mode 100644
index 0000000..2bd32d5
--- /dev/null
+++ b/bin/download-compiler
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -eu
+
+VERSION="v0.34.1"
+
+mkdir wasm-compiler
+cd wasm-compiler
+curl -L "https://github.com/gleam-lang/gleam/releases/download/$VERSION/gleam-$VERSION-browser.tar.gz" | tar xz
+cd ..