Skip to content

Commit

Permalink
fixme
Browse files Browse the repository at this point in the history
  • Loading branch information
viperML committed Dec 13, 2023
1 parent 375c6cf commit 7f8867c
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
watch_file flake.nix
watch_file flake.lock
watch_file devshell.nix

use flake
33 changes: 33 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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=v" >> "$GITHUB_ENV"
nix shell nixpkgs#nushell -c \
nu -c "open Cargo.toml | get package | get version" \
>> "$GITHUB_ENV"
name: Read version
- name: Tag
run: |
git show-ref --tags $nh_version --quiet
echo $?
if git show-ref --tags $nh_version --quiet; then
echo Tag already exists, skipping
else
echo Pushing tags
git tag $nh_version
git push --tags
fi
10 changes: 4 additions & 6 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions devshell.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
mkShell,
rust-analyzer,
rust-analyzer-unwrapped,
rustfmt,
clippy,
nvd,
nix-output-monitor,
cargo,
rustc,
rustPlatform,
}:
mkShell {
strictDeps = true;
Expand All @@ -15,7 +16,7 @@ mkShell {
cargo
rustc

rust-analyzer
rust-analyzer-unwrapped
rustfmt
clippy
nvd
Expand All @@ -26,5 +27,6 @@ mkShell {

env = {
NH_NOM = "1";
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
};
}

0 comments on commit 7f8867c

Please sign in to comment.