Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!--
When creating a PR, be sure to prepend the PR title with the Conventional Commit type (`feat`, `fix`, or `chore`). This is how we manage package versioning and generating CHANGELOG notes.

Examples:
- "feat: add growl notification to spaces:wait"
- "fix: handle special characters in app names"
- "chore: add dist directory to .gitignore"

The expected Conventional Commit types are listed below.

Learn more about [Conventional Commits](https://www.conventionalcommits.org/).
-->

## Summary
<!-- Brief description of the changes in this PR. -->

## Type of Change
### Breaking Changes (major semver update)
- [ ] Add a `!` after your change type to denote a change that breaks current behavior

### Feature Additions (minor semver update)
- [ ] **feat**: Introduces a new feature to the codebase

### Patch Updates (patch semver update)
- [ ] **fix**: Bug fix
- [ ] **deps**: Dependency upgrade
- [ ] **revert**: Revert a previous commit
- [ ] **chore**: Change that does not affect production code
- [ ] **refactor**: Refactoring existing code without changing behavior
- [ ] **test**: Add/update/remove tests

## Testing
**Notes**:
<!-- Add any context/setup necessary for testing. -->

**Steps**:
1. Replace this text with a list of steps used to validate changes or type 'Passing CI suffices'.
2. ...

## Screenshots (if applicable)

## Related Issues
GitHub issue: #[GitHub issue number]
GUS work item: [WI number](WI link)
16 changes: 16 additions & 0 deletions .github/release-configs/release-please-config.beta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"packages": {
".": {
"release-type": "node",
"version-file": "package.json",
"changelog-path": "CHANGELOG.md",
"extra-files": ["README.md"],
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"prerelease": true,
"prerelease-type": "beta"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"bootstrap-sha": "ac230bea5ae1aab5677303f99996d04d5c4c1b1c"
}
14 changes: 14 additions & 0 deletions .github/release-configs/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"packages": {
".": {
"release-type": "node",
"version-file": "package.json",
"changelog-path": "CHANGELOG.md",
"extra-files": ["README.md"],
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"bootstrap-sha": "ac230bea5ae1aab5677303f99996d04d5c4c1b1c"
}
3 changes: 3 additions & 0 deletions .github/release-configs/release-please-manifest.beta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "3.1.1-beta.0"
}
3 changes: 3 additions & 0 deletions .github/release-configs/release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "3.1.1"
}
44 changes: 44 additions & 0 deletions .github/workflows/release-on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release on Push

# Automatically creates GitHub releases after release PRs are merged
# Uses vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID and secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY

on:
push:
branches:
- main
- beta
# - alpha # Uncomment if you have an alpha channel

jobs:
create-release:
runs-on: pub-hk-ubuntu-24.04-ip # Options: ubuntu-latest | sfdc-hk-ubuntu-latest | pub-hk-ubuntu-24.04-ip
permissions:
contents: write
pull-requests: write
steps:
# owner scopes the token to the org installation so it can access other repos (e.g. private npm-release-workflows)
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID }}
private-key: ${{ secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- uses: actions/checkout@v6

- name: Checkout workflows repository
uses: actions/checkout@v6
with:
repository: heroku/npm-release-workflows
token: ${{ steps.app-token.outputs.token }}
path: workflows-repo
ref: main

- name: Create GitHub Release
uses: ./workflows-repo/.github/actions/release-on-push-create-release-public
with:
package-manager: yarn # npm | yarn | pnpm
branch_name: ${{ github.ref_name }}
token: ${{ steps.app-token.outputs.token }}
128 changes: 128 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: Release

# Public repo workflow using GitHub App token to access private npm-release-workflows
# Uses vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID and secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY

on:
workflow_dispatch:
inputs:
dry_run:
description: 'Test release without publishing (creates PR but skips npm publish)'
type: boolean
default: false
required: false

jobs:
validate:
runs-on: pub-hk-ubuntu-24.04-ip # Options: ubuntu-latest | sfdc-hk-ubuntu-latest | pub-hk-ubuntu-24.04-ip
steps:
# owner scopes the token to the org installation so it can access other repos (e.g. private npm-release-workflows)
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID }}
private-key: ${{ secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- uses: actions/checkout@v6

- name: Checkout workflows repository
uses: actions/checkout@v6
with:
repository: heroku/npm-release-workflows
token: ${{ steps.app-token.outputs.token }}
path: workflows-repo
ref: main

- name: Validate and test
uses: ./workflows-repo/.github/actions/release-validate-public
with:
package-manager: yarn # npm | yarn | pnpm
lint_command: '' # No lint script found
test_command: 'run test'

release-please-pr:
needs: validate
runs-on: pub-hk-ubuntu-24.04-ip # Options: ubuntu-latest | sfdc-hk-ubuntu-latest | pub-hk-ubuntu-24.04-ip
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release-workflow.outputs.release_created }}
tag_name: ${{ steps.release-workflow.outputs.tag_name }}
pr_number: ${{ steps.release-workflow.outputs.pr_number }}
config_file: ${{ steps.release-workflow.outputs.config_file }}
manifest_file: ${{ steps.release-workflow.outputs.manifest_file }}
npm_tag: ${{ steps.release-workflow.outputs.npm_tag }}
package_name: ${{ steps.release-workflow.outputs.package_name }}
no_release_needed: ${{ steps.release-workflow.outputs.no_release_needed }}
pr_already_exists: ${{ steps.release-workflow.outputs.pr_already_exists }}
steps:
# owner scopes the token to the org installation so it can access other repos (e.g. private npm-release-workflows)
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID }}
private-key: ${{ secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- uses: actions/checkout@v6

- name: Checkout workflows repository
uses: actions/checkout@v6
with:
repository: heroku/npm-release-workflows
token: ${{ steps.app-token.outputs.token }}
path: workflows-repo
ref: main

- name: Create release PR
id: release-workflow
uses: ./workflows-repo/.github/actions/release-please-pr-public
with:
package-manager: yarn # npm | yarn | pnpm
branch_name: ${{ github.ref_name }}
dry_run: ${{ inputs.dry_run }}
token: ${{ steps.app-token.outputs.token }}

publish:
needs: release-please-pr
if: needs.release-please-pr.result == 'success' && (needs.release-please-pr.outputs.pr_number != '' || needs.release-please-pr.outputs.pr_already_exists == 'true')
runs-on: pub-hk-ubuntu-24.04-ip # Options: ubuntu-latest | sfdc-hk-ubuntu-latest | pub-hk-ubuntu-24.04-ip
permissions:
contents: write
pull-requests: write
id-token: write
steps:
# owner scopes the token to the org installation so it can access other repos (e.g. private npm-release-workflows)
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID }}
private-key: ${{ secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- uses: actions/checkout@v6

- name: Checkout workflows repository
uses: actions/checkout@v6
with:
repository: heroku/npm-release-workflows
token: ${{ steps.app-token.outputs.token }}
path: workflows-repo
ref: main

- name: Publish to npm
uses: ./workflows-repo/.github/actions/release-publish-public
with:
package-manager: yarn # npm | yarn | pnpm
workflows_token: ${{ steps.app-token.outputs.token }}
build_command: '' # No build script found
dry_run: ${{ inputs.dry_run }}
npm_tag: ${{ needs.release-please-pr.outputs.npm_tag }}
package_name: ${{ needs.release-please-pr.outputs.package_name }}
pr_number: ${{ needs.release-please-pr.outputs.pr_number }}
branch_name: ${{ github.ref_name }}
34 changes: 34 additions & 0 deletions .github/workflows/update-release-configs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Update Release Configs

# Generates release-please config files from release-channels.yml
# Uses vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID and secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY

on:
workflow_dispatch:

jobs:
update-configs:
runs-on: pub-hk-ubuntu-24.04-ip # Options: ubuntu-latest | sfdc-hk-ubuntu-latest | pub-hk-ubuntu-24.04-ip
permissions:
contents: write
pull-requests: write
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.DEV_TOOLS_RELEASE_WORKFLOW_APP_ID }}
private-key: ${{ secrets.DEV_TOOLS_RELEASE_WORKFLOW_APP_PRIVATE_KEY }}

- uses: actions/checkout@v6

- name: Checkout workflows repository
uses: actions/checkout@v6
with:
repository: heroku/npm-release-workflows
token: ${{ steps.app-token.outputs.token }}
path: workflows-repo
ref: main

- name: Update release configs
uses: ./workflows-repo/.github/actions/update-release-configs-job-public
19 changes: 19 additions & 0 deletions release-channels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Release channels configuration - generates release-please config files

channels:
main:
branch: main
prerelease: false
npm-tag: latest

beta:
branch: beta
prerelease: true
prerelease-type: beta
npm-tag: beta

# alpha:
# branch: alpha
# prerelease: true
# prerelease-type: alpha
# npm-tag: alpha