Conversation
|
There was a problem hiding this comment.
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.ymlworkflow. - 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.
| gh release create "$TAG" \ | ||
| --title "$TAG" \ | ||
| --notes "Dev build from commit $SHA" \ | ||
| --prerelease No newline at end of file |
There was a problem hiding this comment.
$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.
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Create release tag | ||
| run: | | ||
| VERSION=$(jq -r '.version' package.json) | ||
| TAG="v${VERSION}" |
There was a problem hiding this comment.
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.
| - 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 |
| run: | | ||
| SHA=$(git rev-parse --short HEAD) | ||
| VERSION=$(jq -r '.version' package.json) | ||
| TAG="v${VERSION}-dev-${SHA}" |
There was a problem hiding this comment.
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.
| 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 |



No description provided.