Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,23 @@ jobs:
key: ${{ runner.os }}-otp-27-build-${{ hashFiles('rebar.config') }}
restore-keys: ${{ runner.os }}-otp-27-build-

- name: Check HEX_API_KEY
run: |
if [ -z "$HEX_API_KEY" ]; then
echo "::error::HEX_API_KEY secret is not set. Go to repo Settings > Secrets and variables > Actions and add a HEX_API_KEY secret with a valid hex.pm write key."
exit 1
fi
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}

- name: Publish to Hex.pm
run: rebar3 hex publish --yes
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}

- name: Generate docs
run: rebar3 ex_doc

- name: Publish docs
run: rebar3 hex docs publish --yes
- name: Generate and publish docs
run: |
rebar3 ex_doc
rebar3 hex docs publish --yes
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}