File tree Expand file tree Collapse file tree 2 files changed +75
-0
lines changed
Expand file tree Collapse file tree 2 files changed +75
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ branches : ["main"]
4+ pull_request :
5+
6+ permissions :
7+ contents : read
8+
9+
10+ jobs :
11+ build_and_test :
12+ runs-on : ubuntu-latest
13+ env :
14+ MIX_ENV : test
15+ steps :
16+ - uses : actions/checkout@v4
17+ - name : Set up Elixir
18+ uses : erlef/setup-beam@v1
19+ with :
20+ elixir-version : ' 1.17.1'
21+ otp-version : ' 27.0'
22+
23+ - name : Restore dependencies cache
24+ uses : actions/cache@v3
25+ with :
26+ path : deps
27+ key : ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
28+ restore-keys : ${{ runner.os }}-mix-
29+
30+ - name : Install dependencies
31+ run : mix deps.get
32+
33+ - run : mix compile --all-warnings --warnings-as-errors
34+ - name : Run tests
35+ run : mix test
36+
Original file line number Diff line number Diff line change 1+ name : Publish to Hex.pm
2+
3+ on :
4+ push :
5+ tags :
6+ - " v[0-9]+.[0-9]+.[0-9]+"
7+ - " v[0-9]+.[0-9]+.[0-9]+-*"
8+
9+ jobs :
10+ publish :
11+ name : Build and publish to Hex.pm
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - name : Set up Elixir
18+ uses : erlef/setup-beam@v1
19+ with :
20+ elixir-version : ' 1.17.1'
21+ otp-version : ' 27.0'
22+
23+ - name : Restore dependencies cache
24+ uses : actions/cache@v3
25+ with :
26+ path : deps
27+ key : ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
28+ restore-keys : ${{ runner.os }}-mix-
29+
30+ - name : Install dependencies
31+ run : mix deps.get
32+
33+ - name : Run tests
34+ run : mix test
35+
36+ - name : Publish to Hex.pm
37+ env :
38+ HEX_API_KEY : ${{ secrets.HEX_API_KEY }}
39+ run : mix hex.publish --yes
You can’t perform that action at this time.
0 commit comments