Skip to content

chore(release): release packages from branch main (#2576) #1177

chore(release): release packages from branch main (#2576)

chore(release): release packages from branch main (#2576) #1177

name: release-please
on:
push:
branches:
- main
permissions:
id-token: write # Required for OIDC authentication with npm
contents: write # to create release commit (google-github-actions/release-please-action)
pull-requests: write # to create release PR (google-github-actions/release-please-action)
jobs:
release-please:
runs-on: ubuntu-latest
steps:
# The "release" step invokes on every merge to 'main' branch
# and collects pending changes in pending release PR.
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
# Steps below publish released packages to npm.
# They only trigger after release-please PR from previous step is merged to main.
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
if: ${{ fromJson(steps.release.outputs.releases_created) }}
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
scope: '@aws'
if: ${{ fromJson(steps.release.outputs.releases_created) }}
- name: Compile and test packages
run: |
npm clean-install
npm run compile
if: ${{ fromJson(steps.release.outputs.releases_created) }}
- name: Publish Chat Client to npm
run: npm publish --workspace chat-client
if: ${{ steps.release.outputs['chat-client--release_created'] }}
- name: Publish LSP Core to npm
run: npm publish --workspace core/aws-lsp-core
if: ${{ steps.release.outputs['core/aws-lsp-core--release_created'] }}
- name: Publish LSP ANTLR4 to npm
run: npm publish --workspace server/aws-lsp-antlr4
if: ${{ steps.release.outputs['server/aws-lsp-antlr4--release_created'] }}
- name: Publish LSP Codewhisperer to npm
run: npm publish --workspace server/aws-lsp-codewhisperer
if: ${{ steps.release.outputs['server/aws-lsp-codewhisperer--release_created'] }}
- name: Publish LSP JSON to npm
run: npm publish --workspace server/aws-lsp-json
if: ${{ steps.release.outputs['server/aws-lsp-json--release_created'] }}
- name: Publish LSP PartiQL to npm
run: npm publish --workspace server/aws-lsp-partiql
if: ${{ steps.release.outputs['server/aws-lsp-partiql--release_created'] }}
- name: Publish LSP Yaml to npm
run: npm publish --workspace server/aws-lsp-yaml
if: ${{ steps.release.outputs['server/aws-lsp-yaml--release_created'] }}
- name: Publish LSP Identity to npm
run: npm publish --workspace server/aws-lsp-identity
if: ${{ steps.release.outputs['server/aws-lsp-identity--release_created'] }}
- name: Publish LSP Notification to npm
run: npm publish --workspace server/aws-lsp-notification
if: ${{ steps.release.outputs['server/aws-lsp-notification--release_created'] }}
- name: Publish LSP S3 to npm
run: npm publish --workspace server/aws-lsp-s3
if: ${{ steps.release.outputs['server/aws-lsp-s3--release_created'] }}