diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a6bd433..c678c10 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,37 +56,33 @@ jobs: include: - version: windows os: windows-latest - release-dir: target/release - executable: sc64deployer.exe - name: sc64-deployer-windows - package: zip - extension: zip + executable: target/release/sc64deployer.exe + package-name: sc64-deployer-windows + package-params: -c -a -f + package-extension: zip - version: windows-32bit os: windows-latest build-params: --target=i686-pc-windows-msvc - release-dir: target/i686-pc-windows-msvc/release - executable: sc64deployer.exe - name: sc64-deployer-windows-32bit - package: zip - extension: zip + executable: target/i686-pc-windows-msvc/release/sc64deployer.exe + package-name: sc64-deployer-windows-32bit + package-params: -c -a -f + package-extension: zip - version: linux os: ubuntu-latest linux-packages: libudev-dev - release-dir: target/release - executable: sc64deployer - name: sc64-deployer-linux - package: tar -czf - extension: tar.gz + executable: target/release/sc64deployer + package-name: sc64-deployer-linux + package-params: -czf + package-extension: tar.gz - version: macos os: macos-latest - release-dir: target/release - executable: sc64deployer - name: sc64-deployer-macos - package: tar -czf - extension: tgz + executable: target/release/sc64deployer + package-name: sc64-deployer-macos + package-params: -czf + package-extension: tgz runs-on: ${{ matrix.os }} @@ -114,22 +110,21 @@ jobs: - name: Package executable run: | - PACKAGE_DIR=$(pwd)/package - mkdir -p $PACKAGE_DIR - cd ${{ matrix.release-dir }} - ${{ matrix.package }} $PACKAGE_DIR/${{ matrix.name }}-${{ steps.version.outputs.replaced }}.${{ matrix.extension }} ${{ matrix.executable }} - shell: bash + mkdir -p ./package + cp ${{ matrix.executable }} ./package/ + cd ./package + tar ${{ matrix.package-params }} ./${{ matrix.package-name }}-${{ steps.version.outputs.replaced }}.${{ matrix.package-extension }} * working-directory: sw/deployer - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: ${{ matrix.name }}-${{ steps.version.outputs.replaced }} - path: sw/deployer/package/${{ matrix.name }}-${{ steps.version.outputs.replaced }}.${{ matrix.extension }} + name: ${{ matrix.package-name }}-${{ steps.version.outputs.replaced }} + path: sw/deployer/package/${{ matrix.package-name }}-${{ steps.version.outputs.replaced }}.${{ matrix.package-extension }} - name: Upload release assets if: github.event_name == 'release' && github.event.action == 'created' uses: softprops/action-gh-release@v0.1.15 with: files: | - sw/deployer/package/${{ matrix.name }}-${{ steps.version.outputs.replaced }}.${{ matrix.extension }} + sw/deployer/package/${{ matrix.package-name }}-${{ steps.version.outputs.replaced }}.${{ matrix.package-extension }}