Skip to content

Commit 8a38814

Browse files
committed
Expand publish to hex command
1 parent 1ed479e commit 8a38814

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/manual-publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ jobs:
4545
- name: Publish to Hex.pm
4646
run: |
4747
mix hex.config api_key ${{ secrets.HEX_API_KEY }}
48-
mix hex.publish --yes --replace
48+
# First try without --replace, then with --replace if the version already exists
49+
mix hex.publish --yes 2>&1 || {
50+
echo "Publication failed, trying with --replace flag..."
51+
mix hex.publish --yes --replace
52+
}
4953
5054
- name: Create GitHub Release
5155
# Create a release only if the input version starts with 'v' (indicating a tag)

0 commit comments

Comments
 (0)