11name : Release
22
3- # This workflow is for PUBLIC repositories that need to use workflows from a PRIVATE repository
4- # It uses token-based checkout to access the private npm-release-workflows repository
5- #
6- # SETUP INSTRUCTIONS:
7- # 1. Create a Personal Access Token (PAT) or GitHub App token with 'repo' scope
8- # - See documentation for token creation instructions (docs/credentials.md)
9- # 2. Add the token as a secret named 'WORKFLOWS_ACCESS_GITHUB_TOKEN' in your repository
10- # 3. Replace 'heroku' with your GitHub organization name
11- # 4. Replace 'npm-release-workflows' with the actual repository name if different
12- # 5. Adjust the hardcoded values in the workflow (package_manager, test_command, lint_command, build_command)
13- # based on your project's needs - these are hardcoded in the workflow, not passed as inputs
14- # 6. Copy this file to .github/workflows/release.yml in your project
3+ # Public repo workflow using token-based checkout to access private npm-release-workflows
154
165on :
176 workflow_dispatch :
187 inputs :
19- # DRY RUN MODE
20- # Set to true to test the release process without actually publishing to npm
21- # Useful for validating workflow changes or testing version bumps
228 dry_run :
239 description : ' Test release without publishing (creates PR but skips npm publish)'
2410 type : boolean
2713
2814jobs :
2915 validate :
30- runs-on : pub-hk-ubuntu-24.04-ip
16+ runs-on : pub-hk-ubuntu-24.04-ip # Options: ubuntu-latest | sfdc-hk-ubuntu-latest | pub-hk-ubuntu-24.04-ip
3117 steps :
3218 - uses : actions/checkout@v4
3319
@@ -42,14 +28,13 @@ jobs:
4228 - name : Validate and test
4329 uses : ./workflows-repo/.github/actions/release-validate-public
4430 with :
45- # Update these values to match your project:
46- package-manager : yarn # Options: npm, yarn, or pnpm (must match your project's package manager)
47- lint_command : ' run lint' # Set to '' to skip if no lint script exists
48- test_command : ' test' # Set to '' to skip if no test script exists
31+ package-manager : yarn # npm | yarn | pnpm
32+ lint_command : ' run lint'
33+ test_command : ' run test'
4934
5035 release-please-pr :
5136 needs : validate
52- runs-on : pub-hk-ubuntu-24.04-ip
37+ runs-on : pub-hk-ubuntu-24.04-ip # Options: ubuntu-latest | sfdc-hk-ubuntu-latest | pub-hk-ubuntu-24.04-ip
5338 permissions :
5439 contents : write
5540 pull-requests : write
@@ -78,15 +63,14 @@ jobs:
7863 id : release-workflow
7964 uses : ./workflows-repo/.github/actions/release-please-pr-public
8065 with :
81- # Update package-manager to match your project (npm, yarn, or pnpm)
82- package-manager : yarn # Must match your project's package manager
66+ package-manager : yarn # npm | yarn | pnpm
8367 branch_name : ${{ github.ref_name }}
8468 dry_run : ${{ inputs.dry_run }}
8569
8670 publish :
8771 needs : release-please-pr
8872 if : needs.release-please-pr.result == 'success' && (needs.release-please-pr.outputs.pr_number != '' || needs.release-please-pr.outputs.pr_already_exists == 'true')
89- runs-on : pub-hk-ubuntu-24.04-ip
73+ runs-on : pub-hk-ubuntu-24.04-ip # Options: ubuntu-latest | sfdc-hk-ubuntu-latest | pub-hk-ubuntu-24.04-ip
9074 permissions :
9175 contents : write
9276 pull-requests : write
@@ -105,10 +89,9 @@ jobs:
10589 - name : Publish to npm
10690 uses : ./workflows-repo/.github/actions/release-publish-public
10791 with :
108- # Update these values to match your project:
109- package-manager : yarn # Options: npm, yarn, or pnpm (used for installing dependencies and building; publishing always uses pnpm)
92+ package-manager : yarn # npm | yarn | pnpm
11093 workflows_token : ${{ secrets.WORKFLOWS_ACCESS_GITHUB_TOKEN }}
111- build_command : ' run build' # Set to '' to skip if no build script exists
94+ build_command : ' run build'
11295 dry_run : ${{ inputs.dry_run }}
11396 npm_tag : ${{ needs.release-please-pr.outputs.npm_tag }}
11497 package_name : ${{ needs.release-please-pr.outputs.package_name }}
0 commit comments