chore(deps-dev): bump @commitlint/cli from 17.5.1 to 17.6.7 #368
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}}" |