Skip to content

Commit 0b8ea04

Browse files
fix(release): correct artifact paths, add upload guard, dispatch to both taps
- Fix upload-assets paths: remove stale /dist/ subdir that upload-artifact@v7 never creates (root cause of the v2.0.1 zero-asset release) - Add explicit pre-upload file existence check that exits non-zero and dumps the artifact tree if any expected file is missing - Add fail_on_unmatched_files: true to softprops/action-gh-release so glob misses are hard failures rather than silent no-ops - Expand notify-homebrew to dispatch to both homebrew-amber_cli (underscore) and homebrew-amber-cli (hyphen) taps Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent c8b0eeb commit 0b8ea04

1 file changed

Lines changed: 32 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,33 @@ jobs:
103103
with:
104104
path: artifacts
105105

106+
- name: Verify artifacts exist
107+
run: |
108+
set -e
109+
for f in \
110+
artifacts/amber_cli-darwin-arm64/amber_cli-darwin-arm64.tar.gz \
111+
artifacts/amber_cli-darwin-arm64/amber_cli-darwin-arm64.tar.gz.sha256 \
112+
artifacts/amber_cli-linux-x86_64/amber_cli-linux-x86_64.tar.gz \
113+
artifacts/amber_cli-linux-x86_64/amber_cli-linux-x86_64.tar.gz.sha256; do
114+
if [ ! -f "$f" ]; then
115+
echo "ERROR: expected file not found: $f"
116+
echo "Artifact tree:"
117+
find artifacts -type f | sort
118+
exit 1
119+
fi
120+
echo "OK: $f"
121+
done
122+
106123
- name: Upload release assets
107124
uses: softprops/action-gh-release@v3
108125
with:
109126
files: |
110-
artifacts/amber_cli-darwin-arm64/dist/amber_cli-darwin-arm64.tar.gz
111-
artifacts/amber_cli-darwin-arm64/dist/amber_cli-darwin-arm64.tar.gz.sha256
112-
artifacts/amber_cli-linux-x86_64/dist/amber_cli-linux-x86_64.tar.gz
113-
artifacts/amber_cli-linux-x86_64/dist/amber_cli-linux-x86_64.tar.gz.sha256
127+
artifacts/amber_cli-darwin-arm64/amber_cli-darwin-arm64.tar.gz
128+
artifacts/amber_cli-darwin-arm64/amber_cli-darwin-arm64.tar.gz.sha256
129+
artifacts/amber_cli-linux-x86_64/amber_cli-linux-x86_64.tar.gz
130+
artifacts/amber_cli-linux-x86_64/amber_cli-linux-x86_64.tar.gz.sha256
114131
tag_name: ${{ github.event.release.tag_name }}
132+
fail_on_unmatched_files: true
115133
env:
116134
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117135

@@ -120,12 +138,20 @@ jobs:
120138
needs: upload-assets
121139
runs-on: ubuntu-latest
122140
if: github.event_name == 'release'
123-
141+
124142
steps:
125-
- name: Repository Dispatch
143+
- name: Dispatch to underscore tap (homebrew-amber_cli)
126144
uses: peter-evans/repository-dispatch@v4
127145
with:
128146
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
129147
repository: amberframework/homebrew-amber_cli
130148
event-type: release-published
131149
client-payload: '{"version": "${{ github.event.release.tag_name }}"}'
150+
151+
- name: Dispatch to hyphen tap (homebrew-amber-cli)
152+
uses: peter-evans/repository-dispatch@v4
153+
with:
154+
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
155+
repository: amberframework/homebrew-amber-cli
156+
event-type: release-published
157+
client-payload: '{"version": "${{ github.event.release.tag_name }}"}'

0 commit comments

Comments
 (0)