diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml new file mode 100644 index 0000000..964d0d4 --- /dev/null +++ b/.github/workflows/build_and_release.yml @@ -0,0 +1,33 @@ +name: Build and Release + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Nix + uses: cachix/install-nix-action@v14 + with: + install_url: https://nixos-nix-install-tests.cachix.org/serve/i6lay7ibnxbw9sz6akk05m0d9yralys1/install + install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' + extra_nix_config: | + experimental-features = nix-command flakes + + - name: Build Deb package + run: nix build .#deb + + - name: Upload DEB package to Release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: result/*.deb + asset_name: pvemon.deb + tag: ${{ github.ref }} + overwrite: true diff --git a/flake.nix b/flake.nix index 0549482..0ae2b9f 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,7 @@ rec { packages.x86_64-linux = with nixpkgs.legacyPackages.x86_64-linux; rec { pvemon = python3Packages.buildPythonApplication { pname = "pvemon"; - version = "0.1.0"; + version = "1.0.0"; src = ./src; propagatedBuildInputs = with python3Packages; [ pexpect diff --git a/src/pvemon/qmblock.py b/src/qmblock/__init__.py similarity index 100% rename from src/pvemon/qmblock.py rename to src/qmblock/__init__.py