gpt-cli 0.1.3

Run linux commands with natural language. Eg.: 'show my graphic card' instead 'lspci | grep VGA'
name: Debug

on:
  push:
    branches: ['*']
  workflow_dispatch:

jobs:
#  snap:
#    runs-on: ubuntu-latest
#    steps:
#      - uses: actions/checkout@v3
#      - name: Install shunit
#        run: sudo apt install -y shunit2
#      - uses: snapcore/action-build@v1
#        id: snapcraft
#      - uses: actions/upload-artifact@v3
#        with:
#          name: snap
#          path: ${{ steps.snapcraft.outputs.snap }}
#      - run: |
#          sudo snap install --dangerous ${{ steps.snapcraft.outputs.snap }} --classic
#      - run: alias p=gpt-cli
#      - run: ./test_version.sh
#  debug:
#    runs-on: ubuntu-latest
#    steps:
#      - uses: actions/checkout@v3
#      - name: Install nFPM
#        run: |
#          echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
#          sudo apt update
#          sudo apt install -y nfpm shunit2 xorg-dev libxcb-composite0-dev
#      - run: cargo build --release
#      - run: nfpm pkg --packager deb --target target
#      - run: sudo apt install ./target/gpt-cli_0.0.16_amd64.deb
#      - run: ./test_version.sh
  deb-rpm:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install nFPM
        run: |
          echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list
          sudo apt update
          sudo apt install -y nfpm shunit2 xorg-dev libxcb-composite0-dev
      - run: cargo build --release
      - name: Get release information
        run: |
          RELEASE_TAG=$(echo "v0.0.17" | sed "s|v||")
          echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
      - name: Update fallback release URL
        run: |
          sed -i "s|version: .*|version: \"${{ env.RELEASE_TAG }}\"|" nfpm.yaml
#      - name: Commit changes
#        uses: EndBug/add-and-commit@v9
#        with:
#          author_name: Daniel Gustaw
#          author_email: gustaw.daniel@gmail.com
#          message: "updated nfpm.yaml version to ${{ env.RELEASE_TAG }}"
#          add: 'nfpm.yaml'
#          push: origin HEAD:main
#          tag_push: '--force'

      - run: cat nfpm.yaml
      - run: nfpm pkg --packager deb --target target
      - run: ls -la target
      - run: sudo apt install ./target/gpt-cli_${{ env.RELEASE_TAG }}_amd64.deb
      - run: ./test_version.sh
      - run: nfpm pkg --packager rpm --target target
      - run: nfpm pkg --packager archlinux --target target
      - name: Compute shasums
        run: |
          mv ./target/gpt-cli_${{ env.RELEASE_TAG }}_amd64.deb gpt-cli_amd64.deb
          mv ./target/gpt-cli-${{ env.RELEASE_TAG }}.x86_64.rpm gpt-cli.x86_64.rpm
          mv ./target/gpt-cli-${{ env.RELEASE_TAG }}-1-x86_64.pkg.tar.zst gpt-cli-x86_64.pkg.tar.zst
          shasum -a 256 gpt-cli_amd64.deb | cut -d " " -f 1 > gpt-cli_amd64.deb.sha256.txt
          shasum -a 256 gpt-cli.x86_64.rpm | cut -d " " -f 1 > gpt-cli.x86_64.rpm.sha256.txt
      - run: ls -la
  #    - name: Release
  #      uses: softprops/action-gh-release@v1
  #      env:
  #        GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
  #      with:
  #        files: |
  #          gpt-cli_amd64.deb
  #          gpt-cli.x86_64.rpm
  #          gpt-cli_amd64.deb.sha256.txt
  #          gpt-cli.x86_64.rpm.sha256.txt
  #          gpt-cli-x86_64.pkg.tar.zst