File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,20 +8,20 @@ to Hex.pm automatically. This is most useful when you tag your repository.
881 . First, create a key on your [ Hex.pm dashboard] ( https://hex.pm/dashboard/keys ) . Make sure to give it write
99 permissions.
1010
11- 2 . Next, use this GitHub Action in your workflow:
11+ 2 . Next, add the key from step 1 to your GitHub repository’s secrets. Call it ` HEX_API_KEY ` .
12+
13+ 3 . Finally, use this GitHub Action in your workflow:
1214
1315 ``` yaml
1416 on :
1517 push :
1618 tags :
1719 - ' *'
18- uses : erlangpack/github-action@v1
19- with :
20- hex-api-key : ${{ secrets.HEX_API_KEY }}
20+ jobs :
21+ publish :
22+ runs-on : ubuntu-latest
23+ steps :
24+ - uses : erlangpack/github-action@v1
25+ env :
26+ HEX_API_KEY : ${{ secrets.HEX_API_KEY }}
2127 ` ` `
22-
23- ## Inputs
24-
25- ### ` hex-api-key`
26-
27- **Required** Your Hex API with write permissions. Make sure never to expose this key, so add it as a secret.
Original file line number Diff line number Diff line change 11name : ' Publish to Hex'
2- description : ' Publish your repository’s Git tags as releases on Hex.pm'
3- inputs :
4- hex-api-key :
5- description : ' Your Hex API key that has write permissions to your package'
6- required : true
2+ description : ' Automate publishing packages on Hex.pm'
73runs :
84 using : ' docker'
95 image : ' Dockerfile'
Original file line number Diff line number Diff line change 11#! /bin/sh -l
22
3- env HEX_API_KEY=$INPUT_HEX_API_KEY rebar3 hex publish -r hexpm --yes
3+ # This is necessary because GitHub changes the home dir to /github/home when the action is started; Rebar doesn't seem
4+ # to respect the REBAR_GLOBAL_CONFIG_DIR env var.
5+ ln -s /rebar3/.config ~ /.config
6+
7+ rebar3 hex publish -r hexpm --yes
You can’t perform that action at this time.
0 commit comments