-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Publish to hex.pm | ||
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: gleam-lang/[email protected] | ||
with: | ||
otp-version: 22.2 | ||
- run: ./scripts/publish.sh | ||
env: | ||
HEX_API_KEY: ${{ secrets.HEX_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The script was taken from http://blog.erlware.org/automatic-hex-package-publishing-with-travis-ci/ | ||
|
||
## Setup hex user | ||
mkdir -p ~/.hex | ||
echo '{username,<<"'${HEX_USERNAME}'">>}.' > ~/.hex/hex.config | ||
echo '{key,<<"'${HEX_KEY}'">>}.' >> ~/.hex/hex.config | ||
set -ex | ||
|
||
## Add the rebar3 hex plugin to global | ||
mkdir -p ~/.config/rebar3 | ||
echo '{plugins, [rebar3_hex]}.' > ~/.config/rebar3/rebar.config | ||
echo '{plugins, [{rebar3_hex, ">= 6.9.3"}]}.' > ~/.config/rebar3/rebar.config | ||
|
||
rebar3 hex publish <<EOF | ||
y | ||
EOF | ||
rebar3 hex publish --yes --repo=hexpm | ||
rebar3 hex docs |