fix(admin): Update params type to be Promise only (ENG-592) #133
Workflow file for this run
This file contains hidden or 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: Reusable Release Steps | ||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
required: false | ||
type: string | ||
default: 'main' | ||
script-path: | ||
required: true | ||
type: string | ||
force-patch: | ||
required: false | ||
type: boolean | ||
default: true | ||
secrets: | ||
GITHUB_TOKEN: | ||
required: true | ||
NPM_TOKEN: | ||
required: true | ||
WORKFLOW_PAT: | ||
required: false | ||
PAYLOAD_SECRET: | ||
required: true | ||
DATABASE_URI: | ||
required: true | ||
RESEND_API_KEY: | ||
required: false | ||
STRIPE_SECRET_KEY: | ||
required: false | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ inputs.ref }} | ||
token: ${{ secrets.WORKFLOW_PAT || secrets.GITHUB_TOKEN }} | ||
- name: Setup Node.js 22.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Setup PNPM | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 10.x | ||
- name: Setup Git | ||
run: | | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "GitHub Actions" | ||
git fetch --all | ||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: Build packages | ||
run: pnpm build | ||
env: | ||
PAYLOAD_SECRET: ${{ secrets.PAYLOAD_SECRET }} | ||
DATABASE_URI: ${{ secrets.DATABASE_URI || 'mongodb://localhost:27017/payload-cms' }} | ||
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY || 'resend-key-placeholder' }} | ||
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY || 'sk_test_placeholder' }} | ||
- name: Run Release Script | ||
id: semantic-release | ||
run: node ${{ inputs.script-path }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_PAT || secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
FORCE_PATCH_RELEASE: ${{ inputs.force-patch && 'true' || 'false' }} | ||
NPM_CONFIG_REGISTRY: 'https://registry.npmjs.org/' | ||
INITIAL_VERSION: '0.0.1' | ||
RELEASE_MAJOR: '0' |