Skip to content

Commit

Permalink
Generate deb package on release #94 (#324)
Browse files Browse the repository at this point in the history
build: generate deb package on release (#94)
  • Loading branch information
Marwanmhks committed Nov 5, 2022
1 parent 8ea3370 commit df6b358
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,31 @@ jobs:
tar czf "$staging.tar.gz" "$staging"
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
- name: Create Debian package
shell: bash
if: startsWith(matrix.build, 'linux-gnu')
run: |
cargo install cargo-deb
cargo deb --target ${{ matrix.target }} --deb-version ${{ needs.create-release.outputs.trip_version }}
case ${{ matrix.target }} in
aarch64-*-linux-*) DPKG_ARCH=arm64 ;;
arm-*-linux-*hf) DPKG_ARCH=armhf ;;
i686-*-linux-*) DPKG_ARCH=i686 ;;
x86_64-*-linux-*) DPKG_ARCH=amd64 ;;
*) DPKG_ARCH=notset ;;
esac;
echo "DPKG_ARCH=${DPKG_ARCH}" >> $GITHUB_ENV
- name: Upload Deb Release Asset
if: startsWith(matrix.build, 'linux-gnu')
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_content_type: application/vnd.debian.binary-package
asset_path: target/${{ matrix.target }}/debian/trippy_${{ needs.create-release.outputs.trip_version }}_${{ env.DPKG_ARCH }}.deb
asset_name: trippy_${{ matrix.target }}_${{ needs.create-release.outputs.trip_version }}_${{ env.DPKG_ARCH }}.deb

- name: Upload release archive
uses: actions/upload-release-asset@v1.0.1
env:
Expand Down

0 comments on commit df6b358

Please sign in to comment.