This commit is contained in:
Mateusz Faderewski 2023-12-17 20:52:46 +01:00
parent dfecc8cc3d
commit 8674cbcfa3

View File

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