Github Action to publish elm package

I just published a Github Action to help Package authors make sure their packages pass their CI checks before triggering a publish.

With this action, the workflow becomes

  • Run elm bump and commit the elm.json with the bumped version (could be in a pull request, or directly in master)
  • Once that change shows up in master, this action will create a git tag and publish the elm package for you

This action automatically takes care of checking if the package has been published, so it will succeed and do a no-op if the current version is already published:

It also will check if you’re on master, and skip publishing if you’re not (so you can bump the version in a pull request and have it release once you merge to master):

Current limitations

Update: I published version 1.0.1, which looks for elm on the PATH, or uses path-to-elm if you specify it like this:

      - uses: dillonkearns/elm-publish-action@master
          github-token: ${{ secrets.GITHUB_TOKEN }}
          path-to-elm: ./node_modules/.bin/elm

My current workflow is to use the elm binary specified in the package.json devDependencies. So it assumes that’s where the binary lives. In a future version, I will probably change this. Especially because Elm packages can be used with multiple Elm versions (unlike Elm projects, which are locked to one specific version).

Real-world example

You can take a look at this project if you want to see elm-publish-action wired into a real Elm package repo:


Feedback and contributions are welcome! I’d love to hear what you think. I’d also love to get even more shared tools in the Elm ecosystem to encapsulate some of these things, for both Elm packages and Elm projects. Hope this one is useful!


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.