ash/.github/workflows/elixir.yml

47 lines
1.4 KiB
YAML
Raw Normal View History

name: Ash CI
2020-06-02 13:21:49 +12:00
on:
push:
2020-06-02 13:44:26 +12:00
branches: [master]
tags-ignore: ["v*"]
2020-06-02 13:21:49 +12:00
pull_request:
2020-06-02 13:44:26 +12:00
branches: [master]
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"]
elixir: ["1.10.0"]
2020-06-03 00:52:41 +12:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020-06-03 01:02:02 +12:00
ASH_CI: true
2020-06-02 13:21:49 +12:00
steps:
- 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}}
- uses: actions/cache@v1
id: cache-deps
with:
2020-06-03 03:20:34 +12:00
path: deps
2020-07-01 03:13:56 +12:00
key: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-2-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-deps-2-
2020-06-03 03:20:34 +12:00
- uses: actions/cache@v1
id: cache-build
with:
path: _build
2020-07-01 03:13:56 +12:00
key: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-build-2-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: otp-${{matrix.otp}}-elixir-${{matrix.elixir}}-build-2-
2020-06-02 13:21:49 +12:00
- run: mix deps.get
2020-06-03 01:03:50 +12:00
- run: mix check
2020-06-03 02:37:31 +12:00
- run: mix hex.publish --yes
2020-06-03 00:37:59 +12:00
if: startsWith(github.ref, 'refs/tags/v')
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}