Skip to content

Commit

Permalink
Publish elm package
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoDaniels committed Dec 12, 2022
1 parent b643d5e commit e4f208e
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Main

on:
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@v18
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/02ac89b8e803.tar.gz
- uses: cachix/cachix-action@v12
with:
name: elm-robots-humans
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"

publish:
name: publish
needs: [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@v18
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/02ac89b8e803.tar.gz
- uses: cachix/cachix-action@v12
with:
name: elm-robots-humans
authToken: ${{secrets.CACHIX_AUTH_TOKEN}}
- name: Publish package
uses: dillonkearns/elm-publish-action@1.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e4f208e

Please sign in to comment.