ref: 786f78c671e3920db63ceb7690e585d7ae6103be
parent: 31307887d5ca4101ebaab0ead9e474b4d8fa5a61
author: Jonne Kokkonen <jonne.kokkonen@gmail.com>
date: Sat Sep 20 17:38:31 EDT 2025
Update update-package-versions.yml Update trigger for 2.x versions, remove obsolete RPM spec stuff
--- a/.github/workflows/update-package-versions.yml
+++ b/.github/workflows/update-package-versions.yml
@@ -1,9 +1,9 @@
-name: Update Version and Hash in flake.nix/RPM spec
+name: Update Version and Hash in flake.nix
on:
push:
tags:
- - v1.*
+ - v2.*
workflow_dispatch:
jobs:
@@ -42,16 +42,15 @@
echo "valid=false" >> $GITHUB_OUTPUT
fi
- - name: Update version in flake.nix and RPM spec
+ - name: Update version in flake.nix
if: steps.valid-tag.outputs.valid
run: |
latest_annotated_tag="${{ steps.newest-tag.outputs.latest_annotated_tag }}" latest_annotated_tag_without_v="${latest_annotated_tag#v}" # Remove 'v' prefixsed -i "s/version = \".*\";/version = \"$latest_annotated_tag_without_v\";/" flake.nix
- sed -i "s/Version:.*/Version: $latest_annotated_tag_without_v/" package/rpm/m8c.spec
new_hash=$(nix-prefetch-url --unpack --type sha256 "https://github.com/laamaa/m8c/archive/v$latest_annotated_tag_without_v.tar.gz") # Use updated variable name
sed -i "s/hash = \".*\";/hash = \"sha256:$new_hash\";/" flake.nix
git config user.email "github-actions@github.com"
git config user.name "GitHub Actions"
- git commit -am "Update version and hash in flake.nix, update RPM spec version to $latest_annotated_tag_without_v"
+ git commit -am "Update version and hash in flake.nix to $latest_annotated_tag_without_v"
git push origin HEAD:main
--
⑨