ci: restrict npm publish tags to main
This commit is contained in:
@@ -15,6 +15,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Verify tag is on main
|
||||||
|
run: |
|
||||||
|
git merge-base --is-ancestor "$GITHUB_SHA" origin/main || {
|
||||||
|
echo "Tag $GITHUB_REF_NAME ($GITHUB_SHA) is not on main; refusing to publish."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### CI
|
||||||
|
|
||||||
|
- Restrict npm publishing to tags whose commit is already on `main`.
|
||||||
|
|
||||||
## [0.2.5] - 2026-07-14
|
## [0.2.5] - 2026-07-14
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
Reference in New Issue
Block a user