Skip to content

Commit

Permalink
add sub-folder generation during packing. Without it the tool cannot …
Browse files Browse the repository at this point in the history
…be used correctly by our tools (#3)
  • Loading branch information
umbynos authored Mar 24, 2022
1 parent fcbcf1f commit 713e9a9
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,21 @@ jobs:

- name: Package
if: matrix.os == 'windows-latest'

working-directory: ${{ env.MCUBOOT_PATH }}/scripts/${{ env.DIST_DIR }}
run: 7z a ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}.zip ${{ env.PROJECT_NAME }}.exe "${{ env.IMGTOOL_PACKING_PATH }}/LICENSE.txt"
run: | # we need to create the subdir where to place binaries
mkdir ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}
mv -v ./${{ env.PROJECT_NAME }}.exe ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}
mv -v "${{ env.IMGTOOL_PACKING_PATH }}/LICENSE.txt" ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}
7z a ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}.zip ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}
- name: Package
if: matrix.os != 'windows-latest'
working-directory: ${{ env.MCUBOOT_PATH }}/scripts/${{ env.DIST_DIR }}
run: ${{ matrix.archive_util }} -cz -C ./ ${{ env.PROJECT_NAME }} -C ${{ env.IMGTOOL_PACKING_PATH }} LICENSE.txt -f ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}.tar.gz
run: | # we need to create the subdir where to place binaries
mkdir ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}
mv -v ./${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}
mv -v ${{ env.IMGTOOL_PACKING_PATH }}/LICENSE.txt ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}
${{ matrix.archive_util }} -cz ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }} -f ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}.tar.gz
- name: Upload artifacts
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -153,7 +160,11 @@ jobs:

- name: Package
working-directory: ${{ env.MCUBOOT_PATH }}/scripts/${{ env.DIST_DIR }}
run: sudo tar -cz -C ./ ${{ env.PROJECT_NAME }} -C ${{ env.IMGTOOL_PACKING_PATH }} LICENSE.txt -f ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}.tar.gz #dist dir is created in the container with different user/grp
run: | # we need to create the subdir where to place binaries
sudo mkdir ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}
sudo mv -v ./${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}
sudo mv -v ${{ env.IMGTOOL_PACKING_PATH }}/LICENSE.txt ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}
sudo tar -cz ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }} -f ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}.tar.gz #dist dir is created in the container with different user/grp
- name: Upload artifacts
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit 713e9a9

Please sign in to comment.