ci: update hex publish logic

This commit is contained in:
Zach Daniel 2020-06-02 08:37:59 -04:00
parent 5063384684
commit c6be22b21d
No known key found for this signature in database
GPG key ID: C377365383138D4B

View file

@ -30,8 +30,8 @@ jobs:
path: | path: |
deps deps
_build _build
key: ${{matrix.otp}}-${{matrix.elixir}}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} key: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-lock-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: ${{matrix.otp}}-${{matrix.elixir}}- restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}
- run: mix deps.get - run: mix deps.get
- run: mix check - run: mix check
- run: mix hex.user auth ash-project - run: mix hex.user auth ash-project
@ -39,3 +39,6 @@ jobs:
env: env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }} HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
- run: mix publish - run: mix publish
if: startsWith(github.ref, 'refs/tags/v')
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}