Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.31 KB

File metadata and controls

35 lines (27 loc) · 1.31 KB

Elixir Publish

Publish an Elixir package to Hex.pm.

How-to Guides

Add a HEX API Key to GitHub Secrets

  1. Create a Hex API Key following Publishing from CI.
  2. Add the Hex API Key to GitHub Encrypted Secret named HEX_API_KEY (or whichever name you prefer, but stick to the convention if possible).

Get Started

  1. Complete Add a HEX API Key to GitHub Secrets if required.

  2. Make sure actions/checkout action is used before this action.

  3. Add this action to your job in your workflow, here is an example:

    #...
    jobs:
      publish:
        name: Publish to Hex.pm
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v2 # checkout the repository first
          - uses: straw-hat-team/github-actions-workflows/elixir/publish@master
            with:
              elixir-version: '1.11' # optional, fallback to use .tool-versions
              otp-version: '22.3' # optional, fallback to use .tool-versions
              version-type: 'loose' # optional, fallback to strict
              hex-api-key: ${{ secrets.HEX_API_KEY }} # (see step 2)