Skip to content

Commit 9957eaf

Browse files
authored
Create publish.yml
1 parent 069ba11 commit 9957eaf

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
env:
11+
MIX_ENV: docs
12+
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup BEAM
18+
uses: erlef/setup-beam@v1
19+
with:
20+
elixir-version: 1.12.x
21+
otp-version: 24.x
22+
23+
- name: Restore dependencies cache
24+
uses: actions/cache@v2
25+
id: cache-elixir-deps
26+
with:
27+
path: |
28+
deps
29+
_build
30+
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
31+
32+
- name: Install Dependencies
33+
if: steps.cache-elixir-deps.outputs.cache-hit != 'true'
34+
run: mix do deps.get, deps.compile, compile
35+
36+
- name: Build and publish
37+
run: mix hex.publish --yes

0 commit comments

Comments
 (0)