Compare commits
7 commits
main
...
v5.0.1-bet
| Author | SHA1 | Date | |
|---|---|---|---|
| ebee172a20 | |||
| cf153566f0 | |||
| 5efc80d8e5 | |||
| 5e18505760 | |||
| 9bfa2eff18 | |||
| 0cbd01a926 | |||
| a40a29d191 |
2 changed files with 22 additions and 16 deletions
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
|
|
@ -30,8 +30,6 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
# Mints the short-lived OIDC credential used for trusted publishing.
|
||||
# No npm token is stored anywhere — this is the credential.
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
|
@ -46,18 +44,22 @@ jobs:
|
|||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: pnpm
|
||||
|
||||
# Trusted publishing (OIDC) requires npm >= 11.5.1.
|
||||
- name: Ensure npm supports trusted publishing
|
||||
run: npm install -g npm@latest
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm build
|
||||
|
||||
# No NODE_AUTH_TOKEN: npm authenticates via OIDC using the trusted
|
||||
# publisher configured on npmjs.com. Provenance is generated
|
||||
# automatically, so --provenance is not needed.
|
||||
- name: Publish
|
||||
run: npm publish --access public
|
||||
run: |
|
||||
VERSION="$(node -p "require('./package.json').version")"
|
||||
if [[ "$VERSION" == *-* ]]; then
|
||||
TAG="${VERSION#*-}"; TAG="${TAG%%.*}"
|
||||
else
|
||||
TAG="latest"
|
||||
fi
|
||||
echo "Publishing $VERSION to dist-tag '$TAG'"
|
||||
npm publish --access public --tag "$TAG"
|
||||
|
||||
publish-gh-packages:
|
||||
name: Publish to GitHub Packages
|
||||
|
|
@ -76,19 +78,23 @@ jobs:
|
|||
with:
|
||||
node-version-file: .nvmrc
|
||||
registry-url: 'https://npm.pkg.github.com'
|
||||
scope: '@ayo-run'
|
||||
cache: pnpm
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm build
|
||||
|
||||
# GitHub Packages requires a scoped name matching the repository owner.
|
||||
# The scoped name applies only to this registry; npm keeps the
|
||||
# unscoped "web-component-base".
|
||||
- name: Scope package name for GitHub Packages
|
||||
run: npm pkg set name="@ayo-run/web-component-base"
|
||||
run: npm pkg set name="web-component-base"
|
||||
|
||||
- name: Publish
|
||||
run: npm publish
|
||||
run: |
|
||||
VERSION="$(node -p "require('./package.json').version")"
|
||||
if [[ "$VERSION" == *-* ]]; then
|
||||
TAG="${VERSION#*-}"; TAG="${TAG%%.*}"
|
||||
else
|
||||
TAG="latest"
|
||||
fi
|
||||
echo "Publishing $VERSION to dist-tag '$TAG'"
|
||||
npm publish --tag "$TAG"
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "web-component-base",
|
||||
"version": "5.0.0",
|
||||
"version": "5.0.1-beta.4",
|
||||
"description": "A zero-dependency & tiny JS base class for creating reactive custom elements easily",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ayo-run/web-component-base.git"
|
||||
"url": "git+https://github.com/ayo-run/wcb.git"
|
||||
},
|
||||
"homepage": "https://WebComponent.io",
|
||||
"keywords": [
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
"author": "Ayo Ayco",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ayo-run/web-component-base/issues"
|
||||
"url": "https://github.com/ayo-run/wcb/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.39.2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue