Skip to content

Commit 5394f4e

Browse files
committed
ci: simplify hex authentication using HEX_API_KEY env var
rebar3_hex natively supports HEX_API_KEY environment variable for authentication. Remove the manual hex.config creation step and rely on the built-in env var support instead.
1 parent c5bf597 commit 5394f4e

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,15 @@ jobs:
4444
test -f doc/index.html || (echo "doc/index.html not found" && exit 1)
4545
echo "Documentation built successfully"
4646
47-
- name: Configure Hex authentication
48-
run: |
49-
mkdir -p ~/.config/rebar3
50-
cat > ~/.config/rebar3/hex.config <<EOF
51-
{api_key, <<"$HEX_API_KEY">>}.
52-
EOF
53-
env:
54-
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
55-
5647
- name: Publish to Hex
5748
run: rebar3 hex publish --yes
49+
env:
50+
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
5851

5952
- name: Publish docs to Hex
6053
run: rebar3 hex docs publish --yes
54+
env:
55+
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
6156

6257
- name: Extract release notes from CHANGELOG
6358
id: changelog

0 commit comments

Comments
 (0)