-
Notifications
You must be signed in to change notification settings - Fork 17
59 lines (48 loc) · 1.44 KB
/
hexpm-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Hex
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-20.04
steps:
- name: Check out
uses: actions/checkout@v2
- name: Generate documentation
run: rebar3 edoc
- name: list dir
run: ls -la
- name: Setup rebar3 hex
run: |
mkdir -p ~/.config/rebar3/
echo "{plugins, [rebar3_hex]}." > ~/.config/rebar3/rebar.config
- run: rebar3 edoc
- name: Prepare Markdown
run: |
echo "" >>README.md
echo "## EDoc documentation" >>README.md
echo "" >>README.md
echo "You can check this library's " >>README.md
echo "[EDoc documentation](edoc.html), " >>README.md
echo "generated automatically from the source code comments." >>README.md
- name: Convert Markdown to HTML
uses: natescherer/[email protected]
with:
path: README.md
- run: |
mv doc/index.html doc/edoc.html
mv README.html doc/index.html
- name: Publish to hex.pm
run: DEBUG=1 rebar3 hex publish --repo hexpm --yes
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
- name: Show dump head
if: failure()
run: head rebar3.crashdump
- uses: actions/upload-artifact@v2
if: failure()
with:
name: rebar3-dump
path: rebar*
if-no-files-found: ignore