chore(deps): update actions/upload-artifact digest to 5076954 (#351) #339
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: 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.inputs.branch || 'main' }} | |
- name: Setup Node | |
uses: josh-development/.github/setup-node@main | |
with: | |
turbo: true | |
- 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 | |
if grep -q '"private": true' "$d/package.json"; then | |
continue | |
fi | |
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 }} |