Skip to content

Commit

Permalink
.github: add workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
asabil committed Oct 19, 2024
1 parent 22fa174 commit fb3743f
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
include:
- otp: "27.1"
rebar3: 3.24.0
os: ubuntu-latest

- otp: "26.2.5"
rebar3: 3.24.0
os: ubuntu-latest

steps:
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
rebar3-version: ${{ matrix.rebar3 }}

- name: Compile
run: rebar3 compile

- name: Run unit tests
run: rebar3 eunit
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish to Hex

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Check out
uses: actions/checkout@v3

- name: Setup rebar3 hex
run: |
mkdir -p ~/.config/rebar3/
echo "{plugins, [rebar3_hex]}." >> ~/.config/rebar3/rebar.config
- name: Publish to Hex.pm
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
run: |
rebar3 hex publish --repo hexpm --yes

0 comments on commit fb3743f

Please sign in to comment.