Skip to content

chore(deps): update dependency prettier to ^3.1.1 (#250) #242

chore(deps): update dependency prettier to ^3.1.1 (#250)

chore(deps): update dependency prettier to ^3.1.1 (#250) #242

name: Continuous Delivery
on:
workflow_dispatch:
inputs:
prNumber:
description: The number of the PR that is being deployed
required: true
branch:
description: The branch that is being deployed.
required: false
default: main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
publish:
name: Publish Next to NPM
runs-on: ubuntu-latest
if: github.repository_owner == 'josh-development'
steps:
- name: Checkout Project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch || 'main' }}
- name: Add TypeScript Problem Matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js v16
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
- name: Bump Versions & Publish
run: |
# Resolve the tag to be used. "next" for push events, "pr-{prNumber}" for dispatch events.
TAG=$([[ ${{ github.event_name }} == 'push' ]] && echo 'next' || echo 'pr-${{ github.event.inputs.prNumber }}')
yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
yarn config set npmPublishRegistry "https://registry.yarnpkg.com"
for d in packages/*; do
pushd $d
yarn bump --preid "${TAG}.$(git rev-parse --verify --short HEAD)"
yarn npm publish --tag ${TAG}
popd
done
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}