Skip to content

Commit

Permalink
publish on hex.pm on release creation
Browse files Browse the repository at this point in the history
  • Loading branch information
cleclefibanity committed Jun 9, 2022
1 parent 71b2575 commit a53836c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish_on_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish release to the Hex.pm

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
otp: ['21.3.8.21']
elixir: ['1.8.2', '1.9.4', '1.10.4']
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Run tests
run: mix test
- name: Publish package
run: mix hex.publish --yes
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}

0 comments on commit a53836c

Please sign in to comment.