From ec8b5286103650f0b0b00fbe53acc354fffb9800 Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Wed, 22 Jan 2025 12:44:07 +0100 Subject: [PATCH] ci(versioning): version packages with nx and remove reference to lerna.json in workflow --- .github/workflows/release-pr.yml | 2 +- pkg/build/actions/bump-version/main.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 1234cdc75ef..6e9cf8a1cd5 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -145,7 +145,7 @@ jobs: - name: Add package.json changes run: | - git add package.json lerna.json yarn.lock packages public + git add package.json yarn.lock packages public test -e e2e/test-plugins && git add e2e/test-plugins git commit -m "Update version to ${{ inputs.version }}" diff --git a/pkg/build/actions/bump-version/main.go b/pkg/build/actions/bump-version/main.go index 24bff9fb85c..e62d2b167f9 100644 --- a/pkg/build/actions/bump-version/main.go +++ b/pkg/build/actions/bump-version/main.go @@ -34,7 +34,6 @@ func main() { ".yarnrc.yml", "nx.json", "project.json", - "lerna.json", "**/package.json", "**/yarn.lock", }, @@ -70,7 +69,7 @@ func WithUpdatedVersion(d *dagger.Client, src *dagger.Directory, nodeVersion, ve WithWorkdir("/src"). WithExec([]string{"yarn", "install"}). WithExec([]string{"npm", "version", version, "--no-git-tag-version"}). - WithExec([]string{"yarn", "run", "lerna", "version", version, "--no-push", "--no-git-tag-version", "--force-publish", "--exact", "--yes"}). + WithExec([]string{"yarn", "nx", "release", "version", version, "--no-git-commit", "--no-git-tag", "--no-stage-changes", "--group grafanaPackages"}). WithExec([]string{"yarn", "install"}). WithExec([]string{"yarn", "prettier:write"}). Directory("/src").