2020-06-02 13:21:49 +12:00
|
|
|
name: Elixir CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-06-02 13:44:26 +12:00
|
|
|
branches: [master]
|
2020-06-02 18:03:27 +12:00
|
|
|
tags-ignore: ["v*"]
|
2020-06-02 13:21:49 +12:00
|
|
|
pull_request:
|
2020-06-02 13:44:26 +12:00
|
|
|
branches: [master]
|
2020-06-02 18:03:27 +12:00
|
|
|
create:
|
|
|
|
tags: ["v*"]
|
2020-06-02 13:21:49 +12:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-06-02 18:25:41 +12:00
|
|
|
otp: ["23"]
|
2020-06-02 18:25:05 +12:00
|
|
|
elixir: ["1.10.0"]
|
2020-06-02 13:21:49 +12:00
|
|
|
steps:
|
2020-06-02 14:00:30 +12:00
|
|
|
- run: sudo apt-get install --yes erlang-dev
|
2020-06-02 13:21:49 +12:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-elixir@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{matrix.otp}}
|
|
|
|
elixir-version: ${{matrix.elixir}}
|
|
|
|
- run: mix deps.get
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
id: cache-deps
|
|
|
|
with:
|
2020-06-02 14:09:16 +12:00
|
|
|
path: |
|
|
|
|
deps
|
|
|
|
_build
|
|
|
|
key: ${{matrix.otp}}-${{matrix.elixir}}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
|
|
|
restore-keys: ${{matrix.otp}}-${{matrix.elixir}}-
|
2020-06-02 13:21:49 +12:00
|
|
|
- run: mix deps.get
|
|
|
|
- run: mix check
|
2020-06-03 00:24:48 +12:00
|
|
|
- run: mix hex.user auth ash-project
|
2020-06-02 18:37:54 +12:00
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
2020-06-02 18:37:02 +12:00
|
|
|
env:
|
|
|
|
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
|
2020-06-03 00:24:48 +12:00
|
|
|
- run: mix publish
|