Publish package to Hex 📦 #62
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish package to Hex 📦 | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: '1.13.4' | |
otp-version: '24.3' | |
- name: Restore dependencies cache | |
uses: actions/cache@v3.3.1 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Compile dependencies | |
run: mix deps.compile | |
- name: Build package | |
run: mix hex.build | |
- name: Release & Publish | |
run: mix hex.publish --yes | |
env: | |
HEX_API_KEY: ${{ secrets.HEX_API_KEY }} |