trippy
trippy copied to clipboard
Generate deb package on release #94
@Marwanmhks are you able to try this out on your fork? It’s tricky to iterate on it in this repo as it’ll only work from master and will create spurious releases as we test. Adding a tag like 1.2.3 on your fork should trigger the release action.
Thanks again for helping with this.
okay let me check it out and get back to you
Okay so I was able to automate the deb packaging upon release but I am having a problem with the artifact upload, I would appreciate any hints.
@Marwanmhks I think you almost had it, nice work.
I had a try on a fork (see here) and was able to get it working with the following:
- name: Build Debian package
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 assets to Github
if: startsWith(matrix.build, 'linux-gnu')
uses: actions/[email protected]
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
If you can update the PR based on this (and squash it down to a single commit) then we should be good to merge it.
Merged, thank you for your contribution @Marwanmhks !