Skip to content

fix(admin): Update params type to be Promise only (ENG-592) #133

fix(admin): Update params type to be Promise only (ENG-592)

fix(admin): Update params type to be Promise only (ENG-592) #133

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:

Check failure on line 18 in .github/workflows/reusable-release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/reusable-release.yml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
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'