Commit c60b692
fix: upload versioned binary to SFTP server on release tag push
The upload-test-binary job was never uploading a versioned binary
(e.g. nvme-cli-v3.0-a.3-x86_64) because:
1. upload.yml listened for `release: published` events, but releases
are created by release.yml using GITHUB_TOKEN. GitHub prevents
GITHUB_TOKEN-triggered actions from firing other workflow events,
so `release: published` never fired.
2. The build step checked `GITHUB_EVENT_NAME == release` which also
never evaluated to true for the same reason.
3. The container job defaults to `sh`, not `bash`, so `[[ ]]` syntax
would have failed.
Fix: add `tags: v*` to the push trigger so the workflow runs when a
version tag is pushed, and use a POSIX-compatible `case` statement
checking `GITHUB_REF` to create the versioned binary using
`GITHUB_REF_NAME` as the tag name.
Co-authored-by: igaw <[email protected]>1 parent b76288e commit c60b692
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
0 commit comments