Skip to content

Commit

Permalink
publish to hex.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
andreineculau committed May 30, 2021
1 parent 14ec95b commit fc1bec4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,23 @@ jobs:
- if: ${{ matrix.otp_vsn == 'latest' }}
shell: bash
run: make elvis docs

# PUBLISH TAGS

- if: ${{ startsWith(github.ref, 'refs/tags/') }}
name: Check is-semver-tag
id: is-semver-tag
shell: bash
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo ::set-output name=check::true
fi
- if: ${{ matrix.otp_vsn == 'latest' && steps.is-semver-tag.outputs.check == 'true'}}
name: Run make publish
shell: bash
env:
HEX_API_KEY: ${{secrets.HEX_API_KEY}}
run: |
mkdir -p ~/.config/rebar3
echo "{plugins, [rebar3_hex]}." > ~/.config/rebar3/rebar.config
make publish
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ cover:
@ $(MAKE) clean-tests
$(REBAR) cover -v

.PHONY: publish
publish: docs
$(REBAR) hex publish -r hexpm --yes

.PHONY: rebar3.OTP18
rebar3.OTP18:
$(CURL) -fqsS -L -o $@ https://github.com/erlang/rebar3/releases/download/3.13.3/rebar3
Expand Down

0 comments on commit fc1bec4

Please sign in to comment.