Skip to content

Align for deployment#93

Merged
Tweentyy merged 2 commits intomainfrom
develop
Apr 7, 2026
Merged

Align for deployment#93
Tweentyy merged 2 commits intomainfrom
develop

Conversation

@Tweentyy
Copy link
Copy Markdown
Contributor

@Tweentyy Tweentyy commented Apr 7, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 7, 2026 16:52
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

@Tweentyy Tweentyy merged commit 0881834 into main Apr 7, 2026
3 checks passed
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 restructures the project’s GitHub Actions release/tagging workflows to better support manual “dev” vs “main” releases and GitHub Release creation.

Changes:

  • Removes the old tag.yml workflow.
  • Adds two new manual workflows: one for dev prereleases and one for main releases (both create tags and GitHub Releases).
  • Minor formatting change in the npm publish workflow.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/tag.yml Removes the legacy dev-tag-only workflow.
.github/workflows/release-package.yml Adds a blank line in the trigger block (no functional change).
.github/workflows/main-release.yml New manual workflow to create v{version} tag and GitHub Release.
.github/workflows/dev-release.yml New manual workflow to create v{version}-dev-{sha} tag and prerelease.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +26 to +29
gh release create "$TAG" \
--title "$TAG" \
--notes "Dev build from commit $SHA" \
--prerelease No newline at end of file
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

$SHA is defined in the previous step but not persisted into the environment, so it will be empty in this separate Create GitHub Release step (resulting in incorrect release notes). Persist SHA via $GITHUB_ENV (or recompute it) before using it in the notes.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +16
- uses: actions/checkout@v5

- name: Create release tag
run: |
VERSION=$(jq -r '.version' package.json)
TAG="v${VERSION}"
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

This will fail if the tag already exists (e.g., rerunning the workflow for the same version). Consider checking for an existing local/remote tag and failing with a clearer message (or explicitly deleting/replacing it) to make reruns deterministic.

Suggested change
- uses: actions/checkout@v5
- name: Create release tag
run: |
VERSION=$(jq -r '.version' package.json)
TAG="v${VERSION}"
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Create release tag
run: |
VERSION=$(jq -r '.version' package.json)
TAG="v${VERSION}"
git fetch --tags origin
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "::error::Tag '$TAG' already exists locally. Refusing to recreate it."
exit 1
fi
if git ls-remote --exit-code --tags origin "refs/tags/$TAG" >/dev/null 2>&1; then
echo "::error::Tag '$TAG' already exists on origin. Refusing to recreate it."
exit 1
fi

Copilot uses AI. Check for mistakes.
run: |
SHA=$(git rev-parse --short HEAD)
VERSION=$(jq -r '.version' package.json)
TAG="v${VERSION}-dev-${SHA}"
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

This will fail if the tag already exists (e.g., rerunning the workflow for the same version/SHA). Consider checking for an existing tag and failing with a clearer message (or explicitly deleting/replacing it) so reruns are deterministic.

Suggested change
TAG="v${VERSION}-dev-${SHA}"
TAG="v${VERSION}-dev-${SHA}"
git fetch --tags origin
if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
echo "Tag '$TAG' already exists. Refusing to recreate it on rerun."
exit 1
fi

Copilot uses AI. Check for mistakes.
@Tweentyy Tweentyy deleted the develop branch April 7, 2026 17:10
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