Skip to content

Commit

Permalink
Add hex to GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
vkatsuba authored and vkatsuba committed Mar 8, 2021
1 parent db599b0 commit 2e17b3d
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/hex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: publish to hex.pm

on:
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-20.04
container:
image: erlang:23.2.5.0-alpine
steps:
- name: Prepare
run: |
apk update
apk --no-cache upgrade
apk --no-cache add gcc git libc-dev libc-utils libgcc linux-headers make bash \
musl-dev musl-utils ncurses-dev pcre2 pkgconf scanelf wget zlib
- uses: actions/checkout@v2
- name: Publish to Hex.pm
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
run: |
rebar3 edoc
rebar3 hex publish -r hexpm --yes
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tetrapak/.local.cache
*~
rebar3
rebar.lock
doc
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
gtplib
======
[![Hex.pm Version][hexpm version]][hexpm]
[![Hex.pm Downloads][hexpm downloads]][hexpm]
[![Build Status][gh badge]][gh]
[![Coverage Status][coveralls badge]][coveralls]
[![Erlang Versions][erlang version badge]][gh]
Expand All @@ -17,6 +19,9 @@ Using rebar:
# rebar3 compile

<!-- Badges -->
[hexpm]: https://hex.pm/packages/gtplib
[hexpm version]: https://img.shields.io/hexpm/v/gtplib.svg?style=flat-square
[hexpm downloads]: https://img.shields.io/hexpm/dt/gtplib.svg?style=flat-square
[gh]: https://github.com/travelping/gtplib/actions/workflows/main.yml
[gh badge]: https://img.shields.io/github/workflow/status/travelping/gtplib/CI?style=flat-square
[coveralls]: https://coveralls.io/github/travelping/gtplib
Expand Down
4 changes: 3 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
%-*-Erlang-*-
{erl_opts, [debug_info]}.

{edoc_opts, [{preprocess, true}]}.

{deps, [
{cut, "1.0.3"},
{ppplib, "1.0.0"}
]}.

{minimum_otp_vsn, "21.3"}.
{plugins, []}.
{plugins, [rebar3_hex]}.

{profiles, [
{test,
Expand Down
4 changes: 3 additions & 1 deletion src/gtplib.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
{vsn, semver},
{description, "Erlang library for GTP-c v1 and v2"},
{applications, [kernel, stdlib]},
{registered, []}
{registered, []},
{licenses, ["Mozilla Public License 2.0"]},
{links, [{"Github", "https://github.com/travelping/gtplib"}]}
]}.

0 comments on commit 2e17b3d

Please sign in to comment.