Skip to content

Commit a7645b8

Browse files
authored
Allow auto or manual run of release build & fix mv error (#903)
* autobuild release: fix rename file to return no error * autobuild release: fix changelog push to use tag on auto or manual run
1 parent dc765e6 commit a7645b8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ jobs:
9292
- name: Rename firmware file if needed
9393
shell: bash
9494
run: |
95-
[ ! -f firmware/fujinet-${{ matrix.target-platform }}-${{ env.TAG_NAME }}.zip ] && mv firmware/fujinet-*.zip firmware/fujinet-${{ matrix.target-platform }}-${{ env.TAG_NAME }}.zip
95+
shopt -s nullglob
96+
dest="firmware/fujinet-${{ matrix.target-platform }}-${{ env.TAG_NAME }}.zip"
97+
files=(firmware/fujinet-*.zip)
98+
if [[ ! -f "$dest" && ${#files[@]} -gt 0 ]]; then
99+
mv "${files[0]}" "$dest"
100+
fi
96101
97102
- name: Fetch Tag Info
98103
run: git fetch --tags --force
@@ -144,6 +149,8 @@ jobs:
144149
name: "Push Change Log"
145150
needs: tagged-release
146151
runs-on: ubuntu-latest
152+
env:
153+
TAG_NAME: ${{ github.event.inputs.tag || github.ref_name }}
147154
steps:
148155
- name: Checkout Source
149156
uses: actions/checkout@v4

0 commit comments

Comments
 (0)