name: Publish the Debian Package

on:
  release:
    types: [published]

jobs:
  publish-deb-package:
    name: Build and publish the Debian package
    runs-on: ubuntu-latest
    container:
      image: docker://dragoncomputer/dragonfire:latest

    steps:
      - uses: actions/checkout@v1

      - name: Cache pip packages
        uses: actions/cache@v1
        with:
          path: /root/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
          restore-keys: |
            ${{ runner.os }}-pip-

      - name: Install dependencies
        run: |
          pip3 install -e .

      - name: Generate the Debian package
        run: |
          dpkg-buildpackage -us -uc
          cd ..
          echo ${{ github.ref }} | cut -c2- | { read version; mv dragonfire_${version}_amd64.deb dragonfire_${{ github.ref }}_amd64.deb; }

      - name: Upload to release
        uses: JasonEtco/upload-to-release@master
        with:
          args: dragonfire_${{ github.ref }}_amd64.deb
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Publish the Debian Package

on:
  release:
    types: [published]

jobs:
  publish-deb-package:
    name: Build and publish the Debian package
    runs-on: ubuntu-latest
    container:
      image: docker://dragoncomputer/dragonfire:latest

    steps:
      - uses: actions/checkout@v1

      - name: Cache pip packages
        uses: actions/cache@v1
        with:
          path: /root/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
          restore-keys: |
            ${{ runner.os }}-pip-

      - name: Install dependencies
        run: |
          pip3 install -e .

      - name: Generate the Debian package
        run: |
          dpkg-buildpackage -us -uc
          cd ..
          echo ${{ github.ref }} | cut -c12- | { read version; mv dragonfire_${version}_amd64.deb dragonfire_${{ github.ref }}_amd64.deb; }

      - name: Upload to release
        uses: JasonEtco/upload-to-release@master
        with:
          args: dragonfire_${{ github.ref }}_amd64.deb
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Fix the Debian package workflow one more time
Fix the Debian package workflow one more time
