diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f64959f3..1a1c6084 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,6 +9,11 @@ defaults: run: shell: bash +env: + MAINTAINER: "xrelkd <46590321+xrelkd@users.noreply.github.com>" + PACKAGE_NAME: "clipcat" + PACKAGE_DESCRIPTION: "Clipboard manager written in Rust Programming Language" + jobs: all: name: Release @@ -24,14 +29,17 @@ jobs: include: - target: aarch64-unknown-linux-musl + arch: arm64 os: ubuntu-latest target_rustflags: "--codegen linker=aarch64-linux-gnu-gcc" - target: armv7-unknown-linux-musleabihf + arch: armhf os: ubuntu-latest target_rustflags: "--codegen linker=arm-linux-gnueabihf-gcc" - target: x86_64-unknown-linux-musl + arch: amd64 os: ubuntu-latest target_rustflags: "" @@ -79,7 +87,30 @@ jobs: run: ./dev-support/bin/create-package shell: bash - - name: Publish Archive + - name: Prepare Debian Package + env: + TARGET: ${{ matrix.target }} + REF: ${{ github.ref }} + OS: ${{ matrix.os }} + ARCH: ${{ matrix.arch }} + TARGET_RUSTFLAGS: ${{ matrix.target_rustflags }} + run: ./dev-support/bin/prepare-deb-package + if: ${{ matrix.arch == 'amd64' }} + shell: bash + + - name: Create Debian Package + id: debian-package + uses: jiro4989/build-deb-action@v3 + if: ${{ matrix.arch == 'amd64' }} + with: + package: ${{ env.PACKAGE_NAME }} + package_root: debian + maintainer: ${{ env.MAINTAINER }} + version: ${{ github.ref }} + arch: ${{ matrix.arch }} + desc: ${{ env.PACKAGE_DESCRIPTION }} + + - name: Publish Package Archive uses: softprops/action-gh-release@v1 if: ${{ startsWith(github.ref, 'refs/tags/') }} with: @@ -88,3 +119,13 @@ jobs: prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish Debian Package + uses: softprops/action-gh-release@v1 + if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.arch == 'amd64' }} + with: + draft: false + files: ${{ steps.debian-package.outputs.file_name }} + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}