Skip to content

chore(deps): bump @types/node from 18.15.11 to 20.4.2 #343

chore(deps): bump @types/node from 18.15.11 to 20.4.2

chore(deps): bump @types/node from 18.15.11 to 20.4.2 #343

Workflow file for this run

name: Publish to npmjs
on:
# When Release Pull Request is merged
pull_request:
branches:
- main
types: [closed]
permissions:
contents: write # for checkout and tag
pull-requests: write # for comments
packages: write # for publish
jobs:
publish-npm:
if: github.event.pull_request.merged == true && ${{ contains(github.event.head_commit.message, 'release main') }}
permissions:
contents: write
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # set this token manually
steps:
- name: "Checkout" # Download code from the repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Checkout all branches and tags
ref: "${{ github.event.pull_request.base.ref }}"
token: ${{ secrets.BUILD_SVC_PAT }} # this is a PAT token generated with a personal user
# setup .npmrc using NODE_AUTH_TOKEN
- name: Setup .npmrc file for publish
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
- name: Configure Git User
run: |
git config --global user.email "${GITHUB_ACTOR}"
git config --global user.name "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Check if able to publish changes
run: npm whoami # will throw and exit if npm is not ready to publish
- name: "Install dependencies"
run: yarn install --immutable --immutable-cache --check-cache
- name: Build Packages for Release
run: yarn build
- name: "Publish to npmJS"
run: yarn run publish from-package --yes
env:
NODE_AUTH_TOKEN: "${{secrets.NPM_TOKEN}}"