Skip to content
Merged
Show file tree
Hide file tree
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
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: release

on:
push:
tags:
- "v*.*.*"

permissions:
id-token: write # Required for NPM trusted publishing.
contents: read

jobs:
npm:
name: Publish to npm
runs-on: ubuntu-latest
environment:
name: release
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: latest
package-manager-cache: false # Disable automatic npm dependency caching to reduce cache poisoning risk
- run: npm install --ignore-scripts --package-lock=false
- run: npm test
- run: npm stage publish # Runs prepublish script.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"url"
],
"repository": "pillarjs/encodeurl",
"publishConfig": {
"tag": "latest-2.x"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/express"
Expand Down
Loading