Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/release-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ name: Publish package yahtml to npm
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
# Keep manual publish from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

Expand All @@ -16,14 +19,12 @@ jobs:
with:
bun-version: 1.2.2

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
# Setup npm registry for trusted publishing via OIDC
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"

# Publish to npm
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: npm publish --provenance --access public