mirror of
https://github.com/fosrl/newt.git
synced 2026-04-15 06:16:39 +00:00
Update nix version in cicd
This commit is contained in:
14
.github/workflows/cicd.yml
vendored
14
.github/workflows/cicd.yml
vendored
@@ -110,6 +110,15 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Update version in flake.nix
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
VERSION: ${{ inputs.version }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
sed -i "s/version = \"[0-9]*\.[0-9]*\.[0-9]*\(-rc\.[0-9]*\)\?\"/version = \"$VERSION\"/" flake.nix
|
||||||
|
echo "Updated flake.nix version to $VERSION"
|
||||||
|
|
||||||
- name: Create and push tag
|
- name: Create and push tag
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
@@ -127,6 +136,11 @@ jobs:
|
|||||||
echo "Tag $VERSION already exists" >&2
|
echo "Tag $VERSION already exists" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if ! git diff --quiet flake.nix; then
|
||||||
|
git add flake.nix
|
||||||
|
git commit -m "chore(nix): update version to $VERSION"
|
||||||
|
git push origin "$TARGET_BRANCH"
|
||||||
|
fi
|
||||||
git tag -a "$VERSION" -m "Release $VERSION"
|
git tag -a "$VERSION" -m "Release $VERSION"
|
||||||
git push origin "refs/tags/$VERSION"
|
git push origin "refs/tags/$VERSION"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user