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
10 changes: 5 additions & 5 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Publish package to npm
name: Publish package to npm (manual)
on:
workflow_dispatch:
inputs:
branch:
description: 'Git branch to build and publish'
description: "Git branch to build and publish"
required: true
default: main
jobs:
Expand All @@ -16,10 +16,10 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
node-version: "22.x"
registry-url: "https://registry.npmjs.org"
- run: npm install -g npm
- run: npm install
- run: npm test
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,24 @@ jobs:
package-name: "@elastic/elasticsearch-serverless"
bootstrap-sha: "e71b2ff05abf70702e9342378da571032e670c8c"
token: ${{ secrets.TOKEN_RELEASE_PLEASE }}

publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
needs: [release-please]
steps:
- uses: actions/checkout@v4
with:
ref: main
- uses: actions/setup-node@v4
with:
node-version: "22.x"
registry-url: "https://registry.npmjs.org"
- run: npm install -g npm
- run: npm install
- run: npm test
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}