Skip to content

CI: update the release workflow#95

Merged
nosborn merged 1 commit intomasterfrom
ci-release-workflow
Jun 12, 2025
Merged

CI: update the release workflow#95
nosborn merged 1 commit intomasterfrom
ci-release-workflow

Conversation

@nosborn
Copy link
Copy Markdown
Owner

@nosborn nosborn commented Jun 12, 2025

No description provided.

Copilot AI review requested due to automatic review settings June 12, 2025 09:57

This comment was marked as outdated.

@nosborn nosborn force-pushed the ci-release-workflow branch from 2f2656c to b71a7e2 Compare June 12, 2025 09:59
@nosborn nosborn requested a review from Copilot June 12, 2025 10:00

This comment was marked as outdated.

@nosborn nosborn force-pushed the ci-release-workflow branch from b71a7e2 to 92d1223 Compare June 12, 2025 10:04
@nosborn nosborn requested a review from Copilot June 12, 2025 10:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the release workflow to check that embedded version numbers in README.md and package.json match the Git tag instead of altering them automatically.

  • Renamed the update step to “Check embedded version numbers”
  • Revised logic to verify version consistency in README.md and package.json
  • Removed the automatic committing and tagging steps

git push origin 'HEAD:${{ github.event.repository.default_branch }}'
git tag --force "${GITHUB_REF_NAME}" HEAD
git push origin "${GITHUB_REF_NAME}" --force
version="$(grep -F "uses: ${GITHUB.REPOSITORY}@" README.md | cut -d@ -f2)"
Copy link

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider ensuring that the grep command returns only a single version value. If multiple matches are possible, you might use a command like 'head -1' to avoid ambiguity.

Suggested change
version="$(grep -F "uses: ${GITHUB.REPOSITORY}@" README.md | cut -d@ -f2)"
version="$(grep -F "uses: ${GITHUB.REPOSITORY}@" README.md | head -1 | cut -d@ -f2)"

Copilot uses AI. Check for mistakes.
if [[ ${version} != "${GITHUB_REF_NAME}" ]]; then
line="$(grep -Fn "uses: ${GITHUB.REPOSITORY}@" README.md | cut -d: -f1)"
printf '::error file=README.md,line=%d::version does not match tag\n' "${line}"
rc=1
Copy link

Copilot AI Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity and to ensure a consistent exit code variable, consider initializing 'rc' at the beginning of the block (e.g., 'rc=0') before any conditional checks.

Copilot uses AI. Check for mistakes.
@nosborn nosborn merged commit 7e5d724 into master Jun 12, 2025
4 checks passed
@nosborn nosborn deleted the ci-release-workflow branch June 12, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants