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
16 changes: 16 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Lint PR Title

on:
pull_request_target:
types: [opened, edited, synchronize]

permissions:
pull-requests: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release Please

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ vars.SDK_BOT_APP_ID }}
private-key: ${{ secrets.SDK_BOT_PRIVATE_KEY }}

- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4
id: release
with:
token: ${{ steps.generate-token.outputs.token }}

publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
uses: ./.github/workflows/release.yml
13 changes: 3 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: Release
on:
# Support manually pushing a new release
workflow_dispatch: {}
# Trigger when a release is published
release:
types: [published]
# Invoked by the release-please workflow when a release is created
workflow_call: {}

defaults:
run:
Expand Down Expand Up @@ -35,12 +34,6 @@ jobs:
run: |
npm run build

- name: Push Release
if: ${{ !github.event.release.prerelease }}
- name: Publish
run: |
npm publish --tag latest --access=public --provenance

- name: Push Pre-Release
if: ${{ github.event.release.prerelease }}
run: |
npm publish --tag next --access=public --provenance
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.12.0"
}
Comment on lines +1 to +3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Seed current version The manifest is the baseline Release Please uses as the last released version. This repo's package.json, package-lock.json, and latest changelog entry are still 0.11.0, but the new manifest starts at 0.12.0. When the first automated release runs, Release Please will calculate the next version from 0.12.0, so the intended first 0.12.x release can be skipped or mis-versioned.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .release-please-manifest.json
Line: 1-3

Comment:
**Seed current version** The manifest is the baseline Release Please uses as the last released version. This repo's `package.json`, `package-lock.json`, and latest changelog entry are still `0.11.0`, but the new manifest starts at `0.12.0`. When the first automated release runs, Release Please will calculate the next version from `0.12.0`, so the intended first `0.12.x` release can be skipped or mis-versioned.

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this....is 0.12.0 ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right — package.json is already at 0.12.0, so the manifest is correct. My original comment was wrong; the manifest properly seeds from the current published version. Sorry for the noise!

12 changes: 12 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"include-component-in-tag": false,
"packages": {
".": {
"release-type": "node",
"changelog-path": "CHANGELOG.md",
"versioning": "default",
"bump-minor-pre-major": true
}
}
}