diff --git a/.envrc b/.envrc index 25c13a3..a43b162 100644 --- a/.envrc +++ b/.envrc @@ -1,4 +1,5 @@ watch_file flake.nix watch_file flake.lock +watch_file devshell.nix use flake \ No newline at end of file diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml new file mode 100644 index 0000000..b2a1cf1 --- /dev/null +++ b/.github/workflows/tag.yaml @@ -0,0 +1,21 @@ +name: Tag version + +on: + push: + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + + - uses: actions/checkout@v3 + name: Checkout + + - run: | + echo -n "nh_version=" >> "$GITHUB_ENV" + nix shell nixpkgs#nushell -c \ + nu -c "open Cargo.toml | get package" \ + >> "$GITHUB_ENV" + cat "$GITHUB_ENV" diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml index 134a236..a3e2c29 100644 --- a/.github/workflows/update.yaml +++ b/.github/workflows/update.yaml @@ -17,15 +17,13 @@ jobs: name: Checkout - run: nix flake update + name: Bump flake.lock - - run: nix profile install --inputs-from . nixpkgs#cargo nixpkgs#rustc - - - run: | - cargo install cargo-bump - cargo bump - name: Bump version + - run: nix run --inputs-from . nixpkgs#cargo-bump + name: Bump Cargo.toml - run: cargo update + name: Bump Cargo.lock - name: Create Pull Request uses: peter-evans/create-pull-request@v4 diff --git a/devshell.nix b/devshell.nix index 125cb0d..2b553b0 100644 --- a/devshell.nix +++ b/devshell.nix @@ -1,12 +1,13 @@ { mkShell, - rust-analyzer, + rust-analyzer-unwrapped, rustfmt, clippy, nvd, nix-output-monitor, cargo, rustc, + rustPlatform, }: mkShell { strictDeps = true; @@ -15,7 +16,7 @@ mkShell { cargo rustc - rust-analyzer + rust-analyzer-unwrapped rustfmt clippy nvd @@ -26,5 +27,6 @@ mkShell { env = { NH_NOM = "1"; + RUST_SRC_PATH = "${rustPlatform.rustLibSrc}"; }; }