Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ updates:
time: "12:00"
day: "sunday"
timezone: "America/Los_Angeles"
commit-message:
prefix: "chore"
- package-ecosystem: "npm"
directory: "/"
open-pull-requests-limit: 5
Expand All @@ -16,6 +18,10 @@ updates:
time: "12:00"
day: "sunday"
timezone: "America/Los_Angeles"
commit-message:
prefix: "fix"
prefix-development: "chore"
include: "scope"
groups:
dev-deps:
dependency-type: "development"
Expand Down
59 changes: 59 additions & 0 deletions .github/release-configs/release-please-config.beta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"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,
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "refactor",
"section": "Code Refactoring"
},
{
"type": "docs",
"section": "Documentation",
"hidden": false
},
{
"type": "test",
"section": "Tests",
"hidden": false
},
{
"type": "build",
"section": "Build System",
"hidden": false
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": false
},
{
"type": "chore",
"section": "Miscellaneous Chores",
"hidden": false
}
],
"prerelease": true,
"prerelease-type": "beta"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"bootstrap-sha": "4d986f830d4087bd78c3f8cc1ace393325161da5"
}
57 changes: 57 additions & 0 deletions .github/release-configs/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"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,
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "refactor",
"section": "Code Refactoring"
},
{
"type": "docs",
"section": "Documentation",
"hidden": false
},
{
"type": "test",
"section": "Tests",
"hidden": false
},
{
"type": "build",
"section": "Build System",
"hidden": false
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": false
},
{
"type": "chore",
"section": "Miscellaneous Chores",
"hidden": false
}
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"bootstrap-sha": "4d986f830d4087bd78c3f8cc1ace393325161da5"
}
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 @@
{
".": "2.0.0-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 @@
{
".": "2.0.0"
}
33 changes: 33 additions & 0 deletions .github/workflows/release-on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release on Push

# Automatically creates GitHub releases after release PRs are merged

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:
- uses: actions/checkout@v4

- name: Checkout workflows repository
uses: actions/checkout@v4
with:
repository: heroku/npm-release-workflows
token: ${{ secrets.WORKFLOWS_ACCESS_GITHUB_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 }}
99 changes: 99 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Release

# Public repo workflow using token-based checkout to access private npm-release-workflows

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:
- uses: actions/checkout@v4

- name: Checkout workflows repository
uses: actions/checkout@v4
with:
repository: heroku/npm-release-workflows
token: ${{ secrets.WORKFLOWS_ACCESS_GITHUB_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: 'run lint'
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:
- uses: actions/checkout@v4

- name: Checkout workflows repository
uses: actions/checkout@v4
with:
repository: heroku/npm-release-workflows
token: ${{ secrets.WORKFLOWS_ACCESS_GITHUB_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 }}

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:
- uses: actions/checkout@v4

- name: Checkout workflows repository
uses: actions/checkout@v4
with:
repository: heroku/npm-release-workflows
token: ${{ secrets.WORKFLOWS_ACCESS_GITHUB_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: ${{ secrets.WORKFLOWS_ACCESS_GITHUB_TOKEN }}
build_command: 'run build'
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 }}
26 changes: 26 additions & 0 deletions .github/workflows/update-release-configs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Update Release Configs

# Generates release-please config files from release-channels.yml

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:
- uses: actions/checkout@v4

- name: Checkout workflows repository
uses: actions/checkout@v4
with:
repository: heroku/npm-release-workflows
token: ${{ secrets.WORKFLOWS_ACCESS_GITHUB_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
Loading