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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- name: "Setup Node Environment"
uses: braintree/web-sdk-github-actions/actions/setup-node@main
with:
cache: npm
node-version-file: ${{ inputs.node-version-file }}

- name: "Lint"
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/pr-title-jira-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ jobs:
inputs.jira-url-pattern != ''"
runs-on: gh-2-core-ubuntu-latest
steps:
- run: node '${{ github.action_path }}/../../dist/check-jira-reference.js'
- uses: actions/checkout@v6
with:
repository: braintree/web-sdk-github-actions
ref: main
path: .web-sdk-github-actions
- run: node '.web-sdk-github-actions/dist/check-jira-reference.js'
shell: bash
env:
PR_BODY: ${{ github.event.pull_request.body }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: "Setup Node.js"
uses: actions/setup-node@v6
- name: "Setup Node Environment"
uses: braintree/web-sdk-github-actions/actions/setup-node@main
with:
node-version-file: .nvmrc
cache: npm

- name: "Simulate version bump (dry run — no commit, branch, or tag)"
id: bump
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ on:
required: false
type: string
default: "ubuntu-latest"
dry-run:
description: "Simulate the release without publishing to npm or creating a GitHub release"
required: false
type: boolean
default: false
secrets:
npm-token:
description: "npm access token (e.g. BRAINTREE_NPM_ACCESS_TOKEN)"
Expand Down Expand Up @@ -66,6 +71,7 @@ jobs:
version-type: ${{ inputs.version-type }}
base-branch: ${{ inputs.base-branch }}
github-token: ${{ secrets.GITHUB_TOKEN }}
dry-run: ${{ inputs.dry-run }}

publish-npm:
needs: bump-version
Expand All @@ -79,6 +85,7 @@ jobs:
uses: braintree/web-sdk-github-actions/actions/npm-publish@main
with:
npm-token: ${{ secrets.npm-token }}
dry-run: ${{ inputs.dry-run }}

publish-release:
needs: publish-npm
Expand All @@ -92,3 +99,4 @@ jobs:
uses: braintree/web-sdk-github-actions/actions/release-notes@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
dry-run: ${{ inputs.dry-run }}
2 changes: 1 addition & 1 deletion .github/workflows/stale-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
contents: write
steps:
- name: "Remove stale branches"
uses: fpicalausa/remove-stale-branches@7c4f2afe88a36c0f9114cd958380979b9d7323fb
uses: fpicalausa/remove-stale-branches@9b829bc2975ade0c61e64e9613def53ec0732440 # 2.6.1
with:
days-before-branch-stale: ${{ inputs.branch-days-stale }}
days-before-branch-delete: ${{ inputs.branch-days-close }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
- name: "Setup Node Environment"
uses: braintree/web-sdk-github-actions/actions/setup-node@main
with:
node-version-file: .nvmrc
cache: npm

- run: npm ci
Expand Down
11 changes: 4 additions & 7 deletions actions/npm-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ inputs:
runs:
using: "composite"
steps:
- name: "Setup Node.js with registry"
uses: actions/setup-node@v6
- name: "Setup Node Environment"
uses: braintree/web-sdk-github-actions/actions/setup-node@main
with:
node-version-file: .nvmrc
registry-url: ${{ inputs.registry-url }}

- name: "Install dependencies"
run: npm ci
shell: bash
cache: npm
install-dependencies: true

- name: "Publish to npm"
run: npm publish --provenance ${{ inputs.dry-run == 'true' && '--dry-run' || '' }}
Expand Down
12 changes: 6 additions & 6 deletions actions/release-notes/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ outputs:
runs:
using: "composite"
steps:
- name: "Setup Node Environment"
uses: braintree/web-sdk-github-actions/actions/setup-node@main
with:
cache: npm

- name: "Checkout latest main"
run: |
git checkout main
Expand All @@ -33,12 +38,7 @@ runs:

- name: "Extract release notes from CHANGELOG"
id: notes
run: |
{
echo 'release_details<<EOF'
awk '/^## / { if (p) exit; p=1 } p' CHANGELOG.md | sed '1d'
echo EOF
} >> "$GITHUB_OUTPUT"
run: node '${{ github.action_path }}/../../dist/extract-release-notes.js'
shell: bash

- name: "Create GitHub release"
Expand Down
4 changes: 2 additions & 2 deletions actions/version-bump/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ runs:
- uses: ${{ github.action_path }}/../setup-git

- name: "Setup Node.js"
uses: actions/setup-node@v6
uses: braintree/web-sdk-github-actions/actions/setup-node@main
with:
node-version-file: .nvmrc
cache: npm

- name: "Validate CHANGELOG"
run: node '${{ github.action_path }}/../../dist/validate-changelog.js'
Expand Down