CI: Fix path to scripts in release-npm.yml workflow (#111330)

* fix path

* fetch depth

* fix missing env var

* limit fetch depth to just 100 commits

* specify version env var

* fix path

* set versions var

* update npm
This commit is contained in:
Josh Hunt
2025-09-18 21:08:13 +00:00
committed by GitHub
parent 23e0adce07
commit 24ec58d514
+16 -4
View File
@@ -59,19 +59,25 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 100
fetch-tags: false
# this will fail with "{commit} is not a valid commit" if the commit is valid but
# not in the last 100 commits.
- name: Verify commit is in workflow HEAD
env:
GIT_COMMIT: ${{ github.event.inputs.grafana_commit }}
run: ./github/workflows/scripts/validate-commit-in-head.sh
run: ./.github/workflows/scripts/validate-commit-in-head.sh
shell: bash
- name: Map version type to NPM tag
id: npm-tag
env:
VERSION: ${{ github.event.inputs.version }}
VERSION_TYPE: ${{ github.event.inputs.version_type }}
REFERENCE_PKG: "@grafana/runtime"
run: |
TAG=$(./github/workflows/scripts/determine-npm-tag.sh)
TAG=$(./.github/workflows/scripts/determine-npm-tag.sh)
echo "NPM_TAG=$TAG" >> "$GITHUB_OUTPUT"
shell: bash
@@ -82,7 +88,11 @@ jobs:
ref: ${{ github.event.inputs.grafana_commit }}
- name: Setup Node
uses: ./github/actions/setup-node
uses: ./.github/actions/setup-node
# Trusted Publishing is only available in npm v11.5.1 and later
- name: Update npm
run: npm install -g npm@^11.5.1
- name: Install dependencies
run: yarn install --immutable
@@ -91,9 +101,11 @@ jobs:
run: yarn run packages:typecheck
- name: Version, build, and pack packages
env:
VERSION: ${{ github.event.inputs.version }}
run: |
yarn run packages:build
yarn lerna version "$PACKAGES_VERSION" \
yarn lerna version "$VERSION" \
--exact \
--no-git-tag-version \
--no-push \