commit 9e974d4ffcef08794c6cd9066114b37dd9bf9bf6
parent 52db1afe988e9d230603fe5f8bc4b28c48a089ce
Author: mtmn <miro@haravara.org>
Date: Sat, 18 Apr 2026 21:01:54 +0200
ci: add release-please pipeline
Diffstat:
3 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
@@ -0,0 +1,42 @@
+on:
+ push:
+ branches:
+ - master
+
+permissions:
+ contents: write
+ pull-requests: write
+
+jobs:
+ release-please:
+ runs-on: ubuntu-latest
+ outputs:
+ prs_created: ${{ steps.release.outputs.prs_created }}
+ pr_branch: ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
+ steps:
+ - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
+ id: release
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ release-type: node
+
+ update-nix-hash:
+ runs-on: ubuntu-latest
+ needs: release-please
+ if: ${{ needs.release-please.outputs.prs_created == 'true' }}
+ steps:
+ - uses: DeterminateSystems/nix-installer-action@da36cb69b1c3247ad7a1f931ebfd954a1105ef14 # v14
+ - name: Update npmDepsHash
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ BRANCH: ${{ needs.release-please.outputs.pr_branch }}
+ run: |
+ git clone --depth=1 --branch="$BRANCH" \
+ "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" .
+ hash=$(nix run nixpkgs#prefetch-npm-deps -- package-lock.json)
+ sed -i "s|npmDepsHash = \"sha256-[^\"]*\"|npmDepsHash = \"$hash\"|" flake.nix
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git add flake.nix
+ git diff --staged --quiet || git commit -m "chore: update npmDepsHash"
+ git push
diff --git a/flake.nix b/flake.nix
@@ -128,7 +128,7 @@
corpus = pkgs.buildNpmPackage {
pname = "corpus";
- version = "1.2.0";
+ version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
inherit src;
npmDepsHash = "sha256-RoFlR1p0UlDz+DASOBD5A06PDl5Wpk02YAf5jyb2Gn0=";
diff --git a/package.json b/package.json
@@ -1,6 +1,6 @@
{
"name": "corpus",
- "version": "1.2.0",
+ "version": "1.1.0",
"description": "ListenBrainz and Last.fm frontend",
"main": "index.js",
"type": "module",