Skip to content

Commit

Permalink
Actions for Elm package
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoDaniels authored Jan 7, 2024
1 parent 9da56fa commit 586c773
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Pull Request

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.elm
key: ${{ runner.os }}-${{ hashFiles('**/elm.json') }}
- uses: cachix/install-nix-action@v21
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/fc541b860a28.tar.gz
- uses: cachix/cachix-action@v12
with:
name: elm-aws-cloudfront
authToken: ${{secrets.CACHIX_AUTH_TOKEN}}
- name: Run tests
run: nix-shell --run "elm-coverage"
- name: Make build
run: nix-shell --run "elm make --output /dev/null"
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
release:
types: [ published ]

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.elm
key: ${{ runner.os }}-${{ hashFiles('**/elm.json') }}
- uses: cachix/install-nix-action@v21
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/fc541b860a28.tar.gz
- uses: cachix/cachix-action@v12
with:
name: elm-aws-cloudfront
authToken: ${{secrets.CACHIX_AUTH_TOKEN}}
- name: Run tests
run: nix-shell --run "elm-coverage"
- name: Make build
run: nix-shell --run "elm make --output /dev/null"
- name: Make docs
run: nix-shell --run "elm make --docs docs.json"
- name: Publish
run: nix-shell --run "elm publish"

0 comments on commit 586c773

Please sign in to comment.