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
19 changes: 13 additions & 6 deletions .github/workflows/deploy-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches: [main] # all branches where deployments currently occur. Make sure this list matches list of branches in `.releaserc` file.

permissions:
id-token: write
contents: write # access to push the git tag
issues: write # Bot creates an issue if there is an issue during deployment process
pull-requests: write # allow bot to make comments on PRs after they get deployed
Expand Down Expand Up @@ -122,6 +123,7 @@ jobs:
name: Deploy to npm
needs: [deploy-git-tag]
if: needs.deploy-git-tag.outputs.new_release_published == 'true' # only run if a git tag was made.
environment: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -132,14 +134,19 @@ jobs:
with:
node-version: '20'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- run: npm ci
- name: Install npm 11.5.1+ for OIDC support
run: npm install -g npm@latest

- name: Deploy to npm
run: ./scripts/deploy-code.sh
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
IS_PRERELEASE: false # at this time, all deployments are made to `main` production branch
- name: Install dependencies
run: npm ci

- name: Run pre-deploy
run: npm run pre-deploy

- name: Publish to npm
run: npm publish --tag latest

- name: Notify team of successful deployment
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
Expand Down
Loading