fix(instrumentation-pg): normalize leading/trailing spaces in databas… #1413
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| name: Run Release Please | |
| jobs: | |
| # creates the release PR, and publishes releases | |
| release-please: | |
| outputs: | |
| releases_created: ${{ steps.release.outputs.releases_created }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 18 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install packages | |
| run: | | |
| npm ci --ignore-scripts | |
| - uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0 | |
| id: otelbot-token | |
| with: | |
| app-id: ${{ vars.OTELBOT_JS_CONTRIB_APP_ID }} | |
| private-key: ${{ secrets.OTELBOT_JS_CONTRIB_PRIVATE_KEY }} | |
| - uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3 | |
| id: release | |
| with: | |
| token: ${{ steps.otelbot-token.outputs.token }} | |
| target-branch: main | |
| # get release PR as we're currently on main | |
| - name: Checkout release PR | |
| # only checkout if a PR has been created, otherwise this will fail | |
| if: ${{ steps.release.outputs.pr }} | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: release-please--branches--main | |
| # use a token so that workflows on the PR run when we push later | |
| token: ${{ steps.otelbot-token.outputs.token }} | |
| fetch-depth: 0 | |
| # If releases have been created, then publish to npm. | |
| npm-publish: | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.releases_created == 'true' }} | |
| permissions: | |
| contents: read | |
| id-token: write # needed for OIDC and provenance | |
| runs-on: ubuntu-latest | |
| environment: npm-publish-environment | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| # Require npm 11.5.1 or later for https://docs.npmjs.com/trusted-publishers. | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: npm ci --ignore-scripts | |
| - run: npm run compile | |
| # Release Please has already incremented versions and published tags, so we just | |
| # need to publish all unpublished versions to npm here | |
| # See: https://github.com/lerna/lerna/tree/main/libs/commands/publish#bump-from-package | |
| - name: Publish to npm | |
| env: | |
| NPM_CONFIG_PROVENANCE: true | |
| run: npx lerna publish from-package --no-push --no-private --no-git-tag-version --yes |